Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to go to cell based upon a calculation MARK M Excel Discussion (Misc queries) 7 November 30th 08 01:28 AM
Run a macro based on a cell value Lisa C. Excel Discussion (Misc queries) 1 March 31st 08 01:11 AM
Is there a way to disable a macro based on the value of a cell? Jeff Excel Discussion (Misc queries) 1 March 7th 08 06:43 PM
macro with input msg based on cell contents Janelle S[_2_] Excel Discussion (Misc queries) 2 February 9th 08 11:47 PM
How do I execute a macro based on the value of a cell in Excel? brettopp Excel Discussion (Misc queries) 12 June 17th 06 01:27 AM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"