LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if not empty do something


Don Guillett;359288 Wrote:
Without looking at your file, try this idea

Sub copyifblank()
lr = Cells(Rows.Count, "b").End(xlUp).Row
For i = 2 To lr
If Cells(i, "d") = "" Then
Cells(i, "a").Resize(, 2).Copy Cells(i + 1, "a")
Cells(i, "g").Resize(, 2).Copy Cells(i + 1, "g")
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Helmut Loeffler" wrote in
message
...

Simon,
Could you please help me. I attached the latest file and when

running
the code, I get an error:

If Cells(cell.Row + 1, "D") = "" Then
Range(Cells(cell.Row, "A"), Cells(cell.Row, "B")).Copy
Range(Cells(cell.Row + 1, "A"), Cells(cell.Row + 1,
"B")).PasteSpecial =
xlPasteAll
=====
here I get "Error 424 - Object Missing
=====
Range(Cells(cell.Row, "G"), Cells(cell.Row, "H")).Copy
Range(Cells(cell.Row + 1, "G"), Cells(cell.Row + 1,
"H")).PasteSpecial =
xlPasteAll
End If



+-------------------------------------------------------------------+
|Filename: CATALOGUE.xlsm

|
|Download:
http://www.thecodecage.com/forumz/attachment.php?attachmentid=147|

+-------------------------------------------------------------------+

--
Helmut Loeffler

------------------------------------------------------------------------
Helmut Loeffler's Profile:
'The Code Cage Forums - View Profile: Helmut Loeffler'

(
http://www.thecodecage.com/forumz/member.php?userid=311)
View this thread: 'if not empty do something - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...ad.php?t=96127)


Thanks for trying to help. No it didn't work either. I changed logic of
procedure and now don't need this particular aspect. Thanks for your
help.
Thread closed.
Helmut


--
Helmut Loeffler
------------------------------------------------------------------------
Helmut Loeffler's Profile: http://www.thecodecage.com/forumz/member.php?userid=311
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=96127

 
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
find empty cells in a column then append row that empty cell is in vbnewbie Excel Programming 9 January 29th 09 09:27 AM
Delete Rows with Empty Cells with empty column 1 Scott Excel Programming 5 October 2nd 06 11:57 PM
Finding next empty empty cell in a range of columns UncleBun Excel Programming 1 January 13th 06 11:22 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


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

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

About Us

"It's about Microsoft Excel"