Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have used the following code to put the formula in a specific column all
the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count,
5).End(xlUp)).offset(1,0) HTH -- AP "Jasmine" a écrit dans le message de news: ... I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1 yields the last row nOneStepBeyond = r.Rows.Count + r.Row the next row -- Gary's Student "Jasmine" wrote: I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use an offset kinda like this...
Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp).offset(1,0)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" -- HTH... Jim Thomlinson "Jasmine" wrote: I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think that will offset the entire range, not just add one more row to it...
I think the offset needs to be inside the final bracket... -- HTH... Jim Thomlinson "Ardus Petus" wrote: Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)).offset(1,0) HTH -- AP "Jasmine" a écrit dans le message de news: ... I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It looks like you should be using another column besides E to get that last
row??? Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With with rng .resize(.rows.count+1).Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" end with Is one more way. Jasmine wrote: I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you! That worked great!
"Ardus Petus" wrote: Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)).offset(1,0) HTH -- AP "Jasmine" a écrit dans le message de news: ... I have used the following code to put the formula in a specific column all the way to the last cell. It is working good, except it misses the last row. Is there a way to force it to go one row extra. Any help will be apprecaited. Thanks! Dim rng As Range With Worksheets("CIP Exceptions") Set rng = .Range(.Cells(5, 5), .Cells(Rows.Count, 5).End(xlUp)) End With rng.Offset(0, 1).Formula = "=TEXT(E5,""mmmm"")" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
find and delete duplicate entries in two columns or find and prin. | Excel Programming | |||
find and delete text, find a 10-digit number and put it in a textbox | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |