Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
I'm using a statement like the following to fill some columns (minus
the header, row 1) with formulas or functions. With ThisWorkbook.Sheets("sheet1").Cells(1, 1).CurrentRegion.Offset(1, 0) .Columns(25).FormulaR1C1 = "=someformula" end with How can I use resize to avoid creating an additional used row at the bottom? I've been fooling with it for a bit now, and I clearly am not understanding it completely. The code works fine as is, but then I have to go get rid of the extra row(s) afterwards. Thanks! Ward376 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
I'd use something like:
Dim myRng as range with ThisWorkbook.Sheets("sheet1").Cells(1, 1).CurrentRegion set myrng = .resize(.rows.count-1,1).offset(0,24) 'same as 25th column end with myrng.formular1c1 = "=someformulainr1c1reference style" ward376 wrote: I'm using a statement like the following to fill some columns (minus the header, row 1) with formulas or functions. With ThisWorkbook.Sheets("sheet1").Cells(1, 1).CurrentRegion.Offset(1, 0) .Columns(25).FormulaR1C1 = "=someformula" end with How can I use resize to avoid creating an additional used row at the bottom? I've been fooling with it for a bit now, and I clearly am not understanding it completely. The code works fine as is, but then I have to go get rid of the extra row(s) afterwards. Thanks! Ward376 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
How about if I want to use the first column?
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
Can I set this range in one line?
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
I keep getting an object/application-defined error at the Set line.
|
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize offset
Show the code
"ward376" wrote: I keep getting an object/application-defined error at the Set line. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Set new range based on rng.Offset(rng.Rows.Count, 0).Resize(1, 1) | Excel Programming | |||
Why Copy/Paste fails using Offset & Resize of myRange? | Excel Discussion (Misc queries) | |||
I could NOT resize the axis title but excel allows me to resize gr | Charts and Charting in Excel | |||
using .resize or an offset | Excel Programming | |||
I could NOT resize the axis title but excel allows me to resize gr | Charts and Charting in Excel |