Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
I have several Blank rows above each is a row of data (covering columns A-D), what I want to do is populate each blank row with the following:-
Col A - Copy the Text from Row Above Col B - Insert fixed Text "ABC" Col C - I wish to remain blank Col D - Copy the value that is in Col C in Row above to this column Do above until last Row in sheet (as sheet can have a variable length) Basically above are Debit and Credit lines, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
Claus, works perfect, one slight update I need,
Re Col D - if Col C is blank i.e. has no value (in the row above), then what the Value is in Col D should be copied to Col C, if Col C is not blank, then your original code As mentioned, these are Debit & Credits, so in first post I assumed all my data rows were debits i.e. had a value in Col C |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
Claus, thats it, works exactly how I want, one small thing, the very last row of Data doesn't copy down, so the code stops at the last row, but that last row needs to be copied down, then stop
I'm assuming this line needs adjustment LRow = .Cells(.Rows.Count, 1).End(xlUp).Row? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
Hi,
Am Thu, 5 Jan 2017 01:04:02 -0800 (PST) schrieb : Claus, thats it, works exactly how I want, one small thing, the very last row of Data doesn't copy down, so the code stops at the last row, but that last row needs to be copied down, then stop change that row Set myRng = .Range("A2:A" & LRow) to Set myRng = .Range("A2:A" & LRow + 1) Regards Claus B. -- Windows10 Office 2016 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
Claus, that didn't do anything, still last row hasn't copied
|
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
|
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Row Above, with a Twist Q
Bingo Claus, thats it. Many thanks
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy many sheets into one twist | Excel Discussion (Misc queries) | |||
If but with a twist:( | New Users to Excel | |||
Sum with a twist | Excel Discussion (Misc queries) | |||
Copy A Worksheet, with a Twist | Excel Programming | |||
Copy a Formula down with a Twist Q | Excel Worksheet Functions |