Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
last row of sheet1 to use in a formula in sheet2
I would like to use the last row number as a value in the last row of a range.
For example, the following formula will determine a row number that I can display in a message.: LRow = ThisWorkbook.Sheets("sales").Cells(Rows.Count, 1).End(xlUp).Row Now, on another worksheet in the same workbook, I have a macro that at some point has the following line: Range("A1:E1").Select Selection.AutoFill Destination:=Range("A1:E201"), Type:=xlFillDefault I would like the LRow value to be inserted in place of the 201 in the range above. I tried Range("A1:E(SLRow)") but that didn't work. This must be easy, but maybe I am tired and so it eludes me. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
A1 Sheet2 is linked to A1 sheet1 so that user enters value(abc123) a1 sheet1 and A1 sheet2 is updated | Excel Programming | |||
need a formula to transpose sets of data from Sheet1 to Sheet2 | Excel Discussion (Misc queries) | |||
formula-add 2 numbers of cell a1 and a2 of sheet1 ans-b9in sheet2 | Excel Worksheet Functions | |||
Add a formula to sheet2 for to each nonempty line in sheet1 | Excel Programming |