Word can change the case of selected text, but that capability is notably lacking in Excel....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Word can change the case of selected text, but that capability is notably lacking in Excel. Write an Excel subroutine that enables an Excel user to change the case of text in any selected range. In the instruction, inform the user to first select the cell(s) that contain(s) the text to be manipulated before clicking on the button to run the application. User is allowed to select a range of multiple rows/columns. Use Error handling to notify that the user did not select any text. An example of running the subroutine is shown in the following figure. Your assignment doesn't have to look like it. Hint: You can use Type in a letter Llowercase [Ulppercase Slentense (Title ClapsSmall O VBA functions: "LCase", "UCase" O Excel function: "Proper". OK Cancel Note: 1- the "Proper" function is used to capitalize the first letter in a text string and any other letters in text that follow any character other than a letter. It converts all other letters to lowercase letters. Ref: https://support.microsoft.com/en-us/office/proper-function-52a5a283-e8b2-49be-8506- 62887b889f94 2- To access a range selected in a worksheet, you can use the application selection property Ref: https://docs.microsoft.com/en- us/office/vba/api/excel.application.selection?flurl=%3Fappld%3DDev11/DEF1%26l%3Den- US%26k%3Dk(vbaxl10.chm183107);k(TargetFrameworkMoniker- Office.Version%3Dv16)%26rd%3Dtrue The user must select one of the 5 following cases: Sentence: Capitalize only the first letter in a sentence, the rest converted to lower case letters. Lowercase: All letters in the sentence are converted to lower case letters. Uppercase: All letters in the sentence are converted to uppercase case letters. Titles: Capitalize the first letter of each work in sentence, the rest is converted to lower case letter. Caps small: Capitalize all letters in a sentence, keeping the first letter of each word at it is original font size, reducing the size of the rest of the letter to 0.85 smaller. Example: hello class => HELLO CLASS (after applying Caps small). Word can change the case of selected text, but that capability is notably lacking in Excel. Write an Excel subroutine that enables an Excel user to change the case of text in any selected range. In the instruction, inform the user to first select the cell(s) that contain(s) the text to be manipulated before clicking on the button to run the application. User is allowed to select a range of multiple rows/columns. Use Error handling to notify that the user did not select any text. An example of running the subroutine is shown in the following figure. Your assignment doesn't have to look like it. Hint: You can use Type in a letter Llowercase [Ulppercase Slentense (Title ClapsSmall O VBA functions: "LCase", "UCase" O Excel function: "Proper". OK Cancel Note: 1- the "Proper" function is used to capitalize the first letter in a text string and any other letters in text that follow any character other than a letter. It converts all other letters to lowercase letters. Ref: https://support.microsoft.com/en-us/office/proper-function-52a5a283-e8b2-49be-8506- 62887b889f94 2- To access a range selected in a worksheet, you can use the application selection property Ref: https://docs.microsoft.com/en- us/office/vba/api/excel.application.selection?flurl=%3Fappld%3DDev11/DEF1%26l%3Den- US%26k%3Dk(vbaxl10.chm183107);k(TargetFrameworkMoniker- Office.Version%3Dv16)%26rd%3Dtrue The user must select one of the 5 following cases: Sentence: Capitalize only the first letter in a sentence, the rest converted to lower case letters. Lowercase: All letters in the sentence are converted to lower case letters. Uppercase: All letters in the sentence are converted to uppercase case letters. Titles: Capitalize the first letter of each work in sentence, the rest is converted to lower case letter. Caps small: Capitalize all letters in a sentence, keeping the first letter of each word at it is original font size, reducing the size of the rest of the letter to 0.85 smaller. Example: hello class => HELLO CLASS (after applying Caps small).
Expert Answer:
Answer rating: 100% (QA)
Sub ChangeCase Dim myRange As Range Dim myCell As Range Check if any cells are selected If SelectionCellsCount 1 And IsEmptySelection Then MsgBox Please select a range with text to change the case of vbExclamation Exit Sub End If Set the range to the selection Set myRange Selection ... View the full answer
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these computer engineering questions
-
Case Study Stage 1 Process Analysis Before you begin this assignment be sure you have read the UMUC Family Clinic Case Study and your Week 1 and Week 2 readings which discuss Electronic Health Record...
-
An Excel spreadsheet provides an example of an application program that can be used as a simple database. Required Describe the applications that a spreadsheet can provide and how a spreadsheet could...
-
Select a job title for a career you would like to pursue as summer intern or new graduate. Provide a real-world example of each element in Figure. You may need to interview someone familiar with this...
-
Assume a portfolio of two assets, with $10m invested in asset 1 and $5m invested in asset 2. The per pound covariance matrix of the two assets is: Asset 1 Asset 2 The best hedge of asset 2 is: Asset...
-
Your firm is looking to find new sources of coffee to sustain growth as it internationalizes. Currently, your company only purchases green coffee beans from South America and is hoping to begin...
-
Journal entry to record purchase of $2500 for inventory on credit would beOn January 1, Rare Bird ltd. purchased 12% bonds dated January 1, with a face amount of $20 million. The bonds mature in 2022...
-
Describe corporate ethics, the SarbanesOxley Act of 2002, and corporate compliance.
-
A specialty chemicals facility manufactures two products A and B in barrels. Products A and B utilize thy same raw material; A uses 120 kg/bbl, while B requires 100 kg/bbl. There is an upper limit on...
-
At midday when a black grain storage facility is directly under the Sun, it receives 925 W of solar power per square meter of surface from the Sun. If this hot surface loses energy only by radiation...
-
The proposed rates were not in the range the CEO expected given the pricing analysis. The CEO has asked the pricing actuary to verify the total projected loss cost excluding potential large storm...
-
Caroline Corp purchased the assets of Hayden Inc. for $7 million cash. The fair value of Hayden Inc's assets was 3.4 million and the purchased company had total liabilities of $350,000. How much...
-
What is the liquid that exists on the surface of Saturn's largest moon, Titan Explain.
-
After falling from rest from a height of 30 m, a 0.50-kg ball rebounds upward, reaching a height of 20 m. If the contact between ball and ground lasted 2.0 ms, what average force was exerted on the...
-
Greg spends all of his income on sandwiches and shoes. Suppose that the government introduces an ad valorem tax of 60% imposed on both sandwiches and shoes. What income tax rate is equivalent to this...
-
Imagine two bored online classmates, Taylor and Adam are playing a "poke and tell" game. Taylor can poke (P) Adam or not (N) and Adam can tattle (T) on Taylor or keep quiet (Q). If Taylor hits Adam...
-
A syringe has an area of 0.8 cm2 at its barrel and then narrows down to an area of 0.11 mm2 at the needle end. If a force of 5.1 N is applied to the syringe, what is the force produced at the tip of...
-
You receive a dividend payment from an investment in the amount of $800 on the first of every quarter. This is expected to go on for a period of 5 years. If your cost of capital was 10.8%, what is...
-
Three successive resonance frequencies in an organ pipe are 1310, 1834, and 2358 Hz. (a) Is the pipe closed at one end or open at both ends? (b) What is the fundamental frequency? (c) What is the...
-
Social entrepreneurs are entrepreneurs who use their talents to advance social causes that are typically linked to the provision of some type of public good. Their challenge within the civil society...
-
Quality of Life Indexes: Every year, various magazines publish lists of The 10 Best Cities for Living" or The 10Worst Cities. These lists are constructed by magazines weighting various factors such...
-
Return to the case of our beer and pizza consumption from end-of-chapter exercise 6.3. A. Again suppose you consume only beer and pizza (sold at prices p1 and p2 respectively) with an exogenously set...
-
Find the probability of an IQ less than 85.
-
If 25 women are randomly selected, find the probability that the mean of their red blood cell counts is less than 4.444. Assume that red blood cell counts of women are normally distributed with a...
-
Mensa International calls itself the international high IQ society, and it has more than 100,000 members. Mensa states that candidates for membership of Mensa must achieve a score at or above the...
Study smarter with the SolutionInn App