Thread
:
if not empty do something
View Single Post
#
7
Posted to microsoft.public.excel.programming
Helmut Loeffler[_2_]
external usenet poster
Posts: 1
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
Reply With Quote
Helmut Loeffler[_2_]
View Public Profile
Find all posts by Helmut Loeffler[_2_]