Thread: Insert Contents
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sal Sal is offline
external usenet poster
 
Posts: 84
Default Insert Contents

Sub Insertcontents()

Range("I2:I" & Range("K" & Rows.Count).End(xlUp).Row).Formula = "04"

End Sub


I am using this macro to fill in blank cells in Column I with 04, depending
on whether Column K has contents in it. The problem I am having is that cells
in Column I which already have contents are being changed to 04 when I only
want the blank cells in Column I to be changed to 04.

I would like to adjust this macro so that if the cells in Column I are blank
they will be changed to 04, however if they already have contents in them
those contents will not be changed to 04. My target is to get both actions
to depend on whether Column K has contents in it. If Column K has contents
activate, if it does not, do not activate. Any help I appreciate.