MrExcel #1 on Top 10 List...

That's not me (as you well know). You have been quiet recently - busy?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
you...seem...to...have...got...him...to...stop...recently...though... ;)
 
Richard!

I have to say your VBE Immediate window trick for mashing cell constants is super cool and I have already scored points using it!

Thank you!

Kevin
 
What trick is that?
 
Patrick gets around? Where is he? :)

The real question is whether Richard has used my Caller trick - someone got caught saying "it can't be done". :biggrin: (it's not very practical)

On a slightly more serious note, let's try to keep this friendly. And welcome, Kevin! :)
 
Last edited:
What trick is that?

Constants in a range of cells can be altered in place using an Excel worksheet formula and without entering that formula in any cells. To do so, first select the cells to be altered. Press ALT+F11 to open the VBE and then press CTRL+G to open the Immediate window. Enter the formula to use to alter the cell constants using the following VBA statement:

Selection.Value = Evaluate("IF(ROW(),formula)")

To reference a specific cell or column use the Selection.Address method:

Selection.Value = Evaluate("IF(ROW(),RIGHT(""00000""" & Selection.Address & ",5))")

The above example pads all constant values with enough zeroes to make the constant five characters long.
 
Oh, that one... ;)
 

Forum statistics

Threads
1,222,646
Messages
6,167,311
Members
452,109
Latest member
nathanle89

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