Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have written the macro (my first!) as below
Function FindOldNominal(NomCode) FindOldNominal = WorksheetFunction.VLookup(NomCode, range("IMPORTRANGE"), 5, false) End Function This works fine... except.. If I alter the value in the defined range "ImportRange" say from 10 to 20 at nomcode X then FindOldNominal(X) still says 10, unless I go into the cell where the formula call of '=FindOldNominal(X)' is and press enter again. My question is I would like it to update it self automatically like the sum function "=sum" does. Is there a reason why this macro isn't or are all macros like this. Is there a way round it if this is the case. Many thanks in anticipation James |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
see response in programming
-- HTH Bob Phillips (replace xxxx in email address with googlemail if mailing direct) "James Cornthwaite" wrote in message ... I have written the macro (my first!) as below Function FindOldNominal(NomCode) FindOldNominal = WorksheetFunction.VLookup(NomCode, range("IMPORTRANGE"), 5, false) End Function This works fine... except.. If I alter the value in the defined range "ImportRange" say from 10 to 20 at nomcode X then FindOldNominal(X) still says 10, unless I go into the cell where the formula call of '=FindOldNominal(X)' is and press enter again. My question is I would like it to update it self automatically like the sum function "=sum" does. Is there a reason why this macro isn't or are all macros like this. Is there a way round it if this is the case. Many thanks in anticipation James |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I automatically update column index number in VLookup whe. | Excel Worksheet Functions | |||
how do I enter data labels for a bar chart and get them to update | Charts and Charting in Excel | |||
WHY DO I HAVE TO CLICK ON THE CELL & ENTER FOR THE VLOOKUP TOWORK | Excel Discussion (Misc queries) | |||
excel macro to update visio orgchart | Excel Discussion (Misc queries) | |||
enter a new value into a cell using macro in excel | Excel Discussion (Misc queries) |