Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - Insert row, copy contents of original row except for contents of columns A-N Royzer Excel Programming 4 February 21st 12 08:04 PM
VBA - Insert row, copy contents of original row except for contents of column A Royzer Excel Programming 4 February 21st 12 02:47 PM
Paste or insert data before and after cel contents New Expressor Excel Discussion (Misc queries) 4 February 17th 09 07:41 PM
Insert row with formulae without contents camlad[_2_] Excel Programming 4 December 11th 08 05:25 PM
How can I insert the contents of a cell as a filename? Tim Richards[_3_] Excel Programming 2 February 21st 05 07:45 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"