A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Copy Row Above, with a Twist Q



 
 
Thread Tools Display Modes
  #1  
Old January 5th 17, 08:52 AM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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,
Ads
  #3  
Old January 5th 17, 09:35 AM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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

  #5  
Old January 5th 17, 10:04 AM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?

  #7  
Old January 5th 17, 10:14 AM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Copy Row Above, with a Twist Q

Claus, that didn't do anything, still last row hasn't copied

  #9  
Old January 5th 17, 11:04 AM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Copy Row Above, with a Twist Q

Bingo Claus, thats it. Many thanks


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy many sheets into one twist Andy Excel Discussion (Misc queries) 2 March 6th 09 02:42 AM
If but with a twist:( AVB Over My Head New Users to Excel 3 September 16th 08 04:43 AM
Sum with a twist andrew Excel Discussion (Misc queries) 15 June 18th 08 08:56 AM
Copy A Worksheet, with a Twist John[_110_] Excel Programming 10 October 28th 05 04:59 PM
Copy a Formula down with a Twist Q John Excel Worksheet Functions 7 November 23rd 04 11:03 PM


All times are GMT +1. The time now is 12:32 AM.


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