Only update cells that are blank/empty

EssKayKay

Active Member
Joined
Jan 5, 2003
Messages
437
Office Version
  1. 2007
Platform
  1. Windows
Hello,

I have a VBA routine I received from a gracious member here (sorry, don’t remember who) that does mostly what I want. It populates a range (T33:T133) with a formula which appears to be working. However, if a cell in the range is already populated with a date I do not want the formula to overwrite what’s there (i.e., only update blank cells). I tried If ActiveCell.Value>0 then but could not get it to work. Any suggestion?

Here’s a portion of the VBA routine in question –
Rich (BB code):
   Range("T33").Formula = "=IF(R33<=$U$27,1,"""")"
   Range("T33:T133").FormulaR1C1 = "=IF(RC[-2]<=R27C21,1,"""")"

Thanks for viewing,
Steve K.
 
You are welcome. Glad we could help.

Note I changed the post marked as the solution. You had marked my post that re-stated your problem, instead of the one actually posting the solution to it.
The post marked as the solution should always be the one containing the actual solution.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,225,624
Messages
6,186,068
Members
453,336
Latest member
Excelnoob223

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