View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GoBucks[_2_] GoBucks[_2_] is offline
external usenet poster
 
Posts: 57
Default Macros for copy and paste of a range

Sorry, yes the range is L6:BJ155. That was a typo on my part. Looking to
begin on row 5, Columns L thru BL, do the logic and then move to line 6, etc.
Also, forgot to mention that if a row has no values, do nothing and move to
next line. Hope this helps.

"JLGWhiz" wrote:

1) for each row in the range (L5:BL5), find the last cell value in the row
(left to right) and copy that value all of the way back to the first cell in
the row of the range.


Should this not be range("L6:BL155") ? L5:BL5 is row 5, which I believe you
said is your header row.



"GoBucks" wrote in message
...
I am a novice to VB/Macros and was looking for some assistance. I would
like
to run a couple of macros through command buttons on a worksheet. I have a
range of data (L6:BL155) with a header row (L5:BL5) consisting of work
week
end dates (Fridays: L5 = 5/8/09 --- BL5= 5/7/10).

I would like to have Macro #1 to do the following:

1) copy all of the values in the range M6:BL155 and paste in the range
L6:BK155
2) clear the contents of the cells in range BL6:BL155
3) adjust the header dates +7 days (L5=5/15/09, M5=5/22/09....BL5=5/12/10)

In summary, I am trying to roll forward the data range one week at a time
after clicking the button.


I would like to have Macro #2 to do the following:

1) for each row in the range (L5:BL5), find the last cell value in the row
(left to right) and copy that value all of the way back to the first cell
in
the row of the range.

For example: If in row 10, cell P10 = 100 and Q10 thru BL10 is blank, then
copy 100 and paste from L10:O10. Then, look in Row 11 and execute the same
logic.

To me, this seems complex but hopefully is pretty straighforward. Any
assistance is greatly appreciated.