Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF won't refresh - please help
Hello
I have a UDF to get the contents of the last cell in a column where those contents are a number and not "". I first find the last cell which typically will contain a formula but have it's value set to "" and then 'count back' until I hit a cell which has a number. My function works, but when I run a sub to refresh other calculations on my sheet, my UDF does not refresh and #VALUE! occurs. Any help will be greatly appreciated. Thanks Tarryn My Function: Function LASTCELL(input_range As Range, n As Integer) Application.Volatile True col_number = input_range.Column last_row = Cells(Rows.Count, col_number).End(xlUp).Row Do Until Application.WorksheetFunction.IsNumber(Cells(last_ row, col_number).Value) last_row = last_row - 1 Loop LASTCELL = Cells(last_row - n, col_number) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming | |||
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) | Excel Programming |