VBA to locate first cell in range that contains a formula

EssKayKay

Board Regular
Joined
Jan 5, 2003
Messages
233
Office Version
  1. 2007
Platform
  1. Windows
I’m not sure this is possible but what I’m looking for is a VBA routine to go to the next cell in a range that contains a formula. Range K33:K1233 contains formulas. As time progresses the beginning cells are converted to values (K33, K34, K35, etc.). When I run a routine via a command button, I want the active cell to be the first cell in the range to be the cell that is a formula not a value.

Now let’s muddy the waters here a bit more. I actually want the active cell to be two columns right of the cell that contains the formula. That is, if the first cell with a formula is K42, then I want the active cell to be M42.

Thanks,
Steve
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Maybe...
VBA Code:
Sub EssKayKay()
    Range("K33:K1233").SpecialCells(xlCellTypeFormulas, 23)(1).Offset(, 2).Select
End Sub
 
Upvote 0
Solution
Excellent! Thank you very much Mark - that did it.
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
Got it - sorry
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,794
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top