macro to run a separate macro dependent on value in cell

  • Thread starter Thread starter scottwilsonx
  • Start date Start date
S

scottwilsonx

Hello again everyone.

I would like some help with writing a code that will do the following:

I have 4 seperate VBA codes that sort my data in different ways. What
want to do is write a separate code that will run a different macr
depending on what value is selected in cell B6.
For example, if b6 =a then it will run macro Run_a, etc

Thanks
Scott
 
Select Case Range("B6")
Case .Value = "a": macro_a
Case .Value = "b": macro_b
Case .Value = "c": macro_c
Case .Value = "d": macro_d
End Select

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top