Question: Rewrite the subroutine in exercise 3 so that its action is dependent on the cells contents. If the cell contents is a formula, it

Rewrite the subroutine in exercise 3 so that its action is dependent on the cell’s contents.

• If the cell contents is a formula, it will be replaced by the same formula multiplied by 2.

• If the cell contents is a number, it will be replaced by a number equal to the old number multiplied by 2.

• On all other cells in the current region, nothing will be done.


To make life easier, you may assume, for the purposes of this exercise, that a formula is anything beginning with “ = ” and a number is anything beginning with the characters “0” to “9.”

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sub DoubleCellContents Dim cell As Range For Each cell In Selection If LeftcellValue 1 Then cellVa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Financial Modeling Questions!