Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
This time we need the offset function c.Offset(-1).Resize(2, 7).Copy I assume that c is a Range object so imagine C is actually A10. We offset -1 row to A9 then we resize by 2 rows and it now becomes A9:A10 and then by 7 columns to achieve what you want -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "puiuluipui" wrote: Hi, i have this line of code that copy 6 cells to the right. Can this be modified to copy the cell before those 6 cells too? dlr = Sheets("Search").Cells(Rows.Count, "a").End(xlUp).Row + 1 c.resize(, 7).Copy Sheets("Search").Cells(dlr, "a") Sheets("search").Cells(dlr, "g") = Worksheets(sh).Name The word this macro is searching for is in B and this is why copied range is B:G This code copy from range B:G. Can this code be made to copy from range A:G? Thanks!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) |