ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Cell from Row Above (https://www.excelbanter.com/excel-programming/339657-copy-cell-row-above.html)

narutard[_23_]

Copy Cell from Row Above
 

is there a command that will copy the row from the row above it. I'
thinking of selection.filldown but i don't know how to adjust th
fields so that it only looks 1 row above it

i'm planing on using this in a loop for a selection that will scan
series of rows and if there is a certain criteria i want it to copy th
above row

THANK

--
narutar
-----------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...fo&userid=2511
View this thread: http://www.excelforum.com/showthread.php?threadid=46637


Mark

Copy Cell from Row Above
 
is there a command that will copy the row from the row above it. I'm
thinking of selection.filldown but i don't know how to adjust the
fields so that it only looks 1 row above it



Rows(ActiveCell.Row - 1).Copy Rows(ActiveCell.Row)



the Copy comman has an optional destination parameter.

The code above copies the row one above, to the current row.

[email protected]

Copy Cell from Row Above
 
Hi

This can be done without a loop. Hope this helps.


Sub fill_in_the_blanks()


Application.ScreenUpdating = False
Columns("A:A").Select
'*copy the cell above it and paste the cell from above to here*
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"

Application.ScreenUpdating = True

End Sub



narutard wrote:
is there a command that will copy the row from the row above it. I'm
thinking of selection.filldown but i don't know how to adjust the
fields so that it only looks 1 row above it

i'm planing on using this in a loop for a selection that will scan a
series of rows and if there is a certain criteria i want it to copy the
above row

THANKS


--
narutard
------------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=466376



narutard[_25_]

Copy Cell from Row Above
 

thanks al

--
narutar
-----------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...fo&userid=2511
View this thread: http://www.excelforum.com/showthread.php?threadid=46637



All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com