Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default modification to existing code to If statement

I use this code to move amounts from column K (11) to column G in the same
row and then delete the contents in the cell in column K. My problem is that
I get an error if there is not amounts in column K. I'm not sure how I would
alter this to say if there is text in col K move it to column G so I don't
get the soft edit. Any ideas. Thank you


Set rng = Columns(11).SpecialCells(xlConstants)
For Each Cell In rng
Cells(Cell.Row, "G").Value = Cell.Value
Next
rng.ClearContents
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
Code modification help AndyMP Excel Worksheet Functions 1 February 8th 09 11:41 PM
Modification to existing Code Jim May Excel Programming 3 July 4th 06 05:51 PM
modification for the code srinivasan Excel Programming 2 August 20th 05 03:12 PM
Help in Modification of existing code JMay Excel Programming 11 February 28th 04 08:11 PM
Modification to code Peter Atherton Excel Programming 1 September 23rd 03 07:36 PM


All times are GMT +1. The time now is 07:16 PM.

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"