Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a spreadsheet with that I recorded a macro to copy several adjacent
cell data from the row above it, however, if I try re-using that macro it uses the cell numbers in the original macro and not the new row I am working on. Is there a way of looking where my cursor is at and then copying the only a certain number of cells from the row above it - not the entire row? Appreciate the assistance and expertise as always. Mary |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
When you record the macro you see a small box with two icons - one to
stop recording (on the left) and another to switch from absolute references (default) to relative references. You should start recording another macro and immediately click on the relative reference icon. After recording you can view your code in the VBE editor and see the differences. Hope this helps. Pete |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Pete - thank you so much, this worked!
"Pete" wrote: When you record the macro you see a small box with two icons - one to stop recording (on the left) and another to switch from absolute references (default) to relative references. You should start recording another macro and immediately click on the relative reference icon. After recording you can view your code in the VBE editor and see the differences. Hope this helps. Pete |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glad to help - thanks for getting back.
Pete |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this function:
Sub FillDown() Range("B2").Select Range(Selection, Selection.End(xlDown)).Select Range("B4:B1000").Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.FormulaR1C1 = "=R[-1]C" End Sub Note: B2 whould be the first cell in the column that contains data; adjust range to suit -- RyGuy "Pete" wrote: Glad to help - thanks for getting back. Pete |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Whoops, I meant to say subroutine, not function...........
-- RyGuy "Pete" wrote: Glad to help - thanks for getting back. Pete |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You do realise that this thread was from a year ago ??
Pete On Feb 6, 3:40 am, ryguy7272 wrote: Whoops, I meant to say subroutine, not function........... -- RyGuy "Pete" wrote: Glad to help - thanks for getting back. Pete- Hide quoted text - - Show quoted text - |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Pete - Do you know how to run it on a different row each time?
"Pete_UK" wrote: You do realise that this thread was from a year ago ?? Pete On Feb 6, 3:40 am, ryguy7272 wrote: Whoops, I meant to say subroutine, not function........... -- RyGuy "Pete" wrote: Glad to help - thanks for getting back. Pete- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Blank cells and Charting multiple data points | Charts and Charting in Excel | |||
enter numbers in blank cells | Excel Worksheet Functions | |||
pivot tables reports - altering display of (blank) cells | Excel Worksheet Functions | |||
FILL IN BLANK CELLS | Excel Discussion (Misc queries) | |||
Blank Cells in Pivot Tables | Excel Discussion (Misc queries) |