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...
-
Successive maximum displacements of a spring-mass-dashpot system similar to that shown in Fig. 19.10 are 1.25, 0.75, and 0.45 in. Knowing that W = 36 lb and k = 175 lb/ft, determine (a) The damping...
-
Two boxes of mens Old Navy shirts were received from the factory. Box 1 contained 25 mesh polo shirts and 15 Super-T shirts. Box 2 contained 30 mesh polo shirts and 10 Super-T shirts. One of the...
-
G. Esteban, the president of a Toronto trucking company, is considering whether to invest $410,000 in new semiautomatic loading equipment that will last five years, have zero scrap value, and...
-
P Company owns 80% of the outstanding stock of S Company. The 2012 sales of S Company included revenue of $390,000 consisting of consulting services billed to P Company at cost plus 30%. P Company...
-
In an effort to control vegetation overgrowth, 55 rabbits are released in an isolated area free of predators. If the population after 1 year has increased to 165 rabbits, what will the population be...
-
Evaluate each of the following. 12 + 6 3
-
7.) Calculate the heat transfer (kJ/kg) for the irreversible process ABC shown in the figure (5 pts). Temperature (C) 400 300 200 100 A 0.0 2.0 B C 4.0 6.0 Entropy (kJ/kg-K)
-
The Shirt Works sells a large variety of tee shirts and sweatshirts. Steve Hooper, the owner, is thinking of expanding his sales by hiring high school students, on a commission basis, to sell...
-
On January 2, 20X1, Best Corporation issued 2,100 shares of its $15 par-value common stock for cash at $27 a share. Required: Prepare the journal entry to record the issuance of the stock.
-
Create a generic class, madLabClass, with one type parameter (the generic stuff we learned) The class will have 3 backing fields One is an integer for an index The second is an array of the type...
-
Koontz Company manufactures a number of products. The standards relating to one of these products are shown below, along with actual cost data for May. Standard Cost per Unit Direct materials:...
-
which answers correctly describe the function of ospf messages during the database exchange process? the routers would use a link-state request packet to ask for missing lsas. the routers would use a...
-
Please give all of the information that the question asking for.Please show the graph.. Paragraph Styles 2. As treasurer of Tempe Corp., you are confronted with the following problem. Assume the 1-...
-
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...
-
The Van Division of Travel Vans Corporation has offered to purchase 180,000 wheels from the Wheel Division for \($76\) per wheel. At a normal volume of 500,000 wheels per year, production costs per...
-
Francisco Consulting Firm provides three types of client services in three health-care-related industries. The income statement for July is as follows: The sales, contribution margin ratios, and...
-
Karakomi Cameras Inc. has a Disposables Division that produces a camera that sells for \($13.00\) per unit in the open market. The cost of the product is \($9.50\) (variable manufacturing of...
Study smarter with the SolutionInn App