Macro based on text

jitendra

Board Regular
Joined
Aug 31, 2011
Messages
92
Hi all,
How to run a macro based upon text, for example a sheet containing 3 macro and I want to run the macro as per my need, so instead of running I want to write something in particular cell,say 01 for macro 1 in a particular cell and when I am hitting the enter button the macro should run.

If any solution is there please help me.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
sub runmacroontext

if range("yourinputcell").value = "something" then
call macro1
end if

if range("yourinputcell").value = "sometingelse" then
call macro2
end if

etc etc
 
Upvote 0

Forum statistics

Threads
1,203,736
Messages
6,057,066
Members
444,903
Latest member
Mavericx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top