ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   setting a condition to call a macro (https://www.excelbanter.com/excel-programming/375648-setting-condition-call-macro.html)

Darren

setting a condition to call a macro
 
In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren

Don Guillett

setting a condition to call a macro
 

if
--
Don Guillett
SalesAid Software

"Darren" wrote in message
...
In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren




Don Guillett

setting a condition to call a macro
 
damn big fingers

In simplest form, if you had a series of macros named MyNum1, MyNum2, -12
then

Application.Run ("MyNum" & Month(Range("a2")))

--
Don Guillett
SalesAid Software

"Darren" wrote in message
...
In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren




Tom Ogilvy

setting a condition to call a macro
 
Dim s as String
s = Format(Activesheet.Range("A1").Value,"mmmm")
Application.Run "'" & Thisworkbook.name & "'!" & s

--
Regards,
Tom Ogilvy

"Darren" wrote in message
...
In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren




Darren

setting a condition to call a macro
 
The suggestions work fine

thanks for the help
--
Darren


"Darren" wrote:

In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren


Don Guillett

setting a condition to call a macro
 

for archival purposes, you should post your final solution.

--
Don Guillett
SalesAid Software

"Darren" wrote in message
...
The suggestions work fine

thanks for the help
--
Darren


"Darren" wrote:

In cell A1 I have a date in the format of DD/MM/YYYY. I want to be able
to
extract the month and from that run a macro based on that months value

eg If january run macro january
if febuary run macro febuary
and so on until december

any suggestions on how I do this.

Thanks
--
Darren





All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com