Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Last request tonight If column A row = 1 copy cells N4,O4,P4,Q4,R4,S4,T4,U4 to N,O,P,Q,R,S,T,U of that row, starting at row 5, repeat to end of column A Again need it in code as data is refreshed and clears certain cells Thanks to people who have helped me tonight, really has been a great help. Blue |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try Sub change_b() Dim RowNdx As Long Dim LastRow As Long Application.ScreenUpdating = False LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row For RowNdx = 5 to LastRow with Cells(RowNdx, "A") if .value = 1 then .offset(0,13).resize(1,8).value = Range("N4:U4").value End If end with Next RowNdx Application.ScreenUpdating = True End Sub -- Regards Frank Kabel Frankfurt, Germany Blue wrote: Hi Last request tonight If column A row = 1 copy cells N4,O4,P4,Q4,R4,S4,T4,U4 to N,O,P,Q,R,S,T,U of that row, starting at row 5, repeat to end of column A Again need it in code as data is refreshed and clears certain cells Thanks to people who have helped me tonight, really has been a great help. Blue |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frank
I should have made it clearer that it is the formulas in the cells N4:U4 that I want to copy not the values, which bit do I need to change to achieve this? Thanks Blue Wondering which book to buy to get head around this DIM stuff? "Frank Kabel" wrote in message ... Hi try Sub change_b() Dim RowNdx As Long Dim LastRow As Long Application.ScreenUpdating = False LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row For RowNdx = 5 to LastRow with Cells(RowNdx, "A") if .value = 1 then .offset(0,13).resize(1,8).value = Range("N4:U4").value End If end with Next RowNdx Application.ScreenUpdating = True End Sub -- Regards Frank Kabel Frankfurt, Germany Blue wrote: Hi Last request tonight If column A row = 1 copy cells N4,O4,P4,Q4,R4,S4,T4,U4 to N,O,P,Q,R,S,T,U of that row, starting at row 5, repeat to end of column A Again need it in code as data is refreshed and clears certain cells Thanks to people who have helped me tonight, really has been a great help. Blue |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
use Bob's suggestion :-) -- Regards Frank Kabel Frankfurt, Germany Blue wrote: Frank I should have made it clearer that it is the formulas in the cells N4:U4 that I want to copy not the values, which bit do I need to change to achieve this? Thanks Blue Wondering which book to buy to get head around this DIM stuff? "Frank Kabel" wrote in message ... Hi try Sub change_b() Dim RowNdx As Long Dim LastRow As Long Application.ScreenUpdating = False LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row For RowNdx = 5 to LastRow with Cells(RowNdx, "A") if .value = 1 then .offset(0,13).resize(1,8).value = Range("N4:U4").value End If end with Next RowNdx Application.ScreenUpdating = True End Sub -- Regards Frank Kabel Frankfurt, Germany Blue wrote: Hi Last request tonight If column A row = 1 copy cells N4,O4,P4,Q4,R4,S4,T4,U4 to N,O,P,Q,R,S,T,U of that row, starting at row 5, repeat to end of column A Again need it in code as data is refreshed and clears certain cells Thanks to people who have helped me tonight, really has been a great help. Blue |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() For i = 5 To Cells(Rows.Count,"A").End(xlUp).Row If Cells(i,"A")= 1 Then Range("N4:U4").Copy Destination:=Cells(i,"N") End If Next i -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Blue" wrote in message ... Hi Last request tonight If column A row = 1 copy cells N4,O4,P4,Q4,R4,S4,T4,U4 to N,O,P,Q,R,S,T,U of that row, starting at row 5, repeat to end of column A Again need it in code as data is refreshed and clears certain cells Thanks to people who have helped me tonight, really has been a great help. Blue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Visible Cells in Sheet with Merged and Hidden Cells | Excel Discussion (Misc queries) | |||
How can I copy big ranges of cells without drag or copy/paste? | Excel Discussion (Misc queries) | |||
Copy Source Cells to Destination Cells Only when a Change Occurs | Excel Discussion (Misc queries) | |||
Copy and paste versus copy and insert copied cells | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) |