Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating column N where is is blank or null
I would like to write a macro that writes a formula in Column N if: i)Column A and Column H are not null/blank ii)Column N is currently blank/null It is important that the macro does not overwrite values/formulas that are already in other rows of column H. The formula should be column G minus column C Thank you very much in advance. Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating column N where is is blank or null
Hi
try the following macro: Sub process_rows() Dim lastrow As Long Dim row_index As Long Application.ScreenUpdating = False lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For row_index = 1 to lastrow If Cells(row_index, 1).Value <"" and _ Cells(row_index, 8).Value <"" and _ cells(row_index,14).value="" then cells(row_index,14).formulaR1C1="=R[0]C7-R[0]C3" End If Next Application.ScreenUpdating = True End Sub -- Regards Frank Kabel Frankfurt, Germany "Steve" schrieb im Newsbeitrag ... I would like to write a macro that writes a formula in Column N if: i)Column A and Column H are not null/blank ii)Column N is currently blank/null It is important that the macro does not overwrite values/formulas that are already in other rows of column H. The formula should be column G minus column C Thank you very much in advance. Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with Formula. Need it to return Null, not Blank | Excel Discussion (Misc queries) | |||
COUNTIF says Null = Blank but Blank < Null | Excel Worksheet Functions | |||
Populating column N with a formula if column A is Null or Blank | Excel Programming | |||
Set a cell to blank (Null) | Excel Programming | |||
How to refer to a blank/null value? | Excel Programming |