Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro based on Cell Value
Hello, i have seen some macros but not exactly what i need.
I want the macro to run based on the value of a cell. IE A1 = "Y" .. Run Macro in D1 A2 = "Y" .. Run Macro in D2 ..... A7 = "Y" .. Run Macro in D7 Etc. How can this be done? Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro based on Cell Value
Can you explain what "run Macro in D1" means? Do you mean you have several
different macros, one for each cell in Column D? Or do you have a single macro that you want to run using the value contained in the cell in Column D corresponding to the cell in Column A with the "Y" in it? If the first one, what are the names of your macros. If the second one, posting your code would probably be useful. Also, what is supposed to happen if more than one cell in Column A has a "Y" in it? Finally, how far down Column A is your "Etc." supposed to mean? Rick "NPell" wrote in message ... Hello, i have seen some macros but not exactly what i need. I want the macro to run based on the value of a cell. IE A1 = "Y" .. Run Macro in D1 A2 = "Y" .. Run Macro in D2 .... A7 = "Y" .. Run Macro in D7 Etc. How can this be done? Thanks |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro based on Cell Value
On Jun 17, 4:42*pm, "Rick Rothstein \(MVP - VB\)"
wrote: Can you explain what "run Macro in D1" means? Do you mean you have several different macros, one for each cell in Column D? Or do you have a single macro that you want to run using the value contained in the cell in Column D corresponding to the cell in Column A with the "Y" in it? If the first one, what are the names of your macros. If the second one, posting your code would probably be useful. Also, what is supposed to happen if more than one cell in Column A has a "Y" in it? Finally, how far down Column A is your "Etc." supposed to mean? Rick "NPell" wrote in message ... Hello, i have seen some macros but not exactly what i need. I want the macro to run based on the value of a cell. IE A1 = "Y" .. Run Macro in D1 A2 = "Y" .. Run Macro in D2 .... A7 = "Y" .. Run Macro in D7 Etc. How can this be done? Thanks- Hide quoted text - - Show quoted text - Run Maco in D1 means i have a specific macro, which is; Sub FillUsername() ActiveCell.FormulaR1C1 = WindowsUserName End Sub And i want that to be populated in D1 If more than one cell in Column A has a Y in it, then it should be irrelevant. Basically if A1 has a Y... then the FillUsername macro populates in D1. Then if A3 = Y then FillUsername populates in D3 Etc. could go down as far as A2000. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to go to cell based upon a calculation | Excel Discussion (Misc queries) | |||
Run a macro based on a cell value | Excel Discussion (Misc queries) | |||
Is there a way to disable a macro based on the value of a cell? | Excel Discussion (Misc queries) | |||
macro with input msg based on cell contents | Excel Discussion (Misc queries) | |||
How do I execute a macro based on the value of a cell in Excel? | Excel Discussion (Misc queries) |