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...
-
A Kubota tractor acquired on January 9 at a cost of $75,000 has an estimated useful life of 20 years. Assuming that it will have no residual value, determine the depreciation for each of the first...
-
Waves in Matter in the = 0 Gauge (a) Find a gauge function that makes (r, t) = 0 a valid choice of gauge. (b) Derive the (generalized) inhomogeneous wave equation in matter (,) satisfied by the...
-
The Washington Company owns no plant assets and had the following income statement for the year: Additional information about the company includes: Use the preceding information to calculate the cash...
-
On January 1, 2014, a U.S. company purchased 100% of the outstanding stock of Ventana Grains, a company located in Latz City, New Zealand. Ventana Grains was organized on January 1, 2000. All the...
-
Right - to - work laws Question 4 8 options: guarantee workers the right to form unions. give workers in a unionized firm the right to choose whether to join the union. prevent employers from hiring...
-
2) Say there are H people in the society and one good with a total endowment of X and that the utility functions are such that the UPF is bowed out from the origin. a) Assume that the utility...
-
Most cooks know that you must tent a large bird during roasting to prevent the skin from burning. Assume we have a turkey in a \(475 \mathrm{~K}\) oven. The oven surface area is \(2...
-
In a parallel plate capacitor, transfer of \(2 \times 10^{36}\) electrons takes place when connected to a \(12-\mathrm{V}\) battery. Estimate the energy stored in the capacitor.
-
A coaxial capacitor consisting of an inner wire and an outer cylindrical shell has a length of \(50 \mathrm{~cm}\) and an outer diameter of \(4 \mathrm{~mm}\). When connected to a \(16.0-\mathrm{V}\)...
-
Suppose that the metal electrodes in a battery are shaped like large parallel plates and are \(2.00 \mathrm{~mm}\) apart so that they are essentially a parallel-plate capacitor. If the battery...
-
When a parallel-plate capacitor has air between its plates and is connected to a \(12.0-\mathrm{V}\) battery, its capacitance is \(33 \mathrm{nF}\). The capacitor is then submerged in distilled...
-
In 1999, NASA launched its Mars Climate Orbiter, a $125 million satellite that was supposed to gather data about weather on the red planet. But the spacecraft failed to make it into orbit, instead...
-
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...
-
Which of the following events will not appear in the cash flows from financing activities section of the statement of cash flow? a. Borrowing cash from a bank b. Issuance of stock in exchange for...
-
Taylor Company reports free cash flow of \(\$ 15,000\), total cash of \(\$ 18,000\), net income of \(\$ 50,000\), current assets of \(\$ 90,000\), average current liabilities of \(\$ 38,400\), and...
-
Which of the following is not a cash equivalent? a. Short-term U.S. Treasury bill b. Short-term certificate of deposit c. Money-market account d. IBM common stock
Study smarter with the SolutionInn App