Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Please help! with find/copy/replace
I have tweaked a macro to do all kinds of new things thanks to searching for answers on this forum. My current issue is that it is skipping a cell. It skips the first '90601' and doesn't copy it. Thanks in advance for any help and advice!!
Dim LSearchRow As Integer LSearchRow = 1 While Len(Range("A" & CStr(LSearchRow)).Value) 0 'If Column D = "90601", copy entire row If Range("D" & CStr(LSearchRow)).Value = "90601" Then Range("D" & CStr(LSearchRow)).EntireRow.Copy 'Insert copied Row below the original Range("D" & CStr(LSearchRow)).EntireRow.Insert Shift:=xlDown 'Change values in Columns D on new row to 20150 Range("D" & CStr(LSearchRow + 1)) = "20150" End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help! with find/copy/replace
Your code misses the first value "90601" because on the same row of the missing value, column A is empty or len...= 0
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
use copy paste function in the find & replace box | Excel Discussion (Misc queries) | |||
Copy contents of Find (Find and Replace) | Excel Discussion (Misc queries) | |||
find and replace help with copy paste | Excel Discussion (Misc queries) | |||
How can i copy the values derived from find and replace? | Excel Discussion (Misc queries) | |||
Find/Replace Event or Find/Replace for Protected Sheet ... | Excel Programming |