Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default If Cell equals "XXX" Then......

I am trying to create a macro that if Cell "B15" which is formated as
"mm/dd/yyyy" = "June/dd/yyyy" then Sheets("June").Select and so on for each
month. I know a longer way of accomplishing this but was just wondering how
to do it without all the code.

Thank you to anyone who helps and all you wonderful people out there that
make this discussion group so valuable by sharing all your knowledge!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default If Cell equals "XXX" Then......


if not isdate(activecell) then exit sub
worksheets(format(Activecell.Value,"mmmm")).Select


--
regards,
Tom Ogilvy


"Benz" wrote:

I am trying to create a macro that if Cell "B15" which is formated as
"mm/dd/yyyy" = "June/dd/yyyy" then Sheets("June").Select and so on for each
month. I know a longer way of accomplishing this but was just wondering how
to do it without all the code.

Thank you to anyone who helps and all you wonderful people out there that
make this discussion group so valuable by sharing all your knowledge!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default If Cell equals "XXX" Then......

It works wonderful, Thanks Again Tom!

"Tom Ogilvy" wrote:


if not isdate(activecell) then exit sub
worksheets(format(Activecell.Value,"mmmm")).Select


--
regards,
Tom Ogilvy


"Benz" wrote:

I am trying to create a macro that if Cell "B15" which is formated as
"mm/dd/yyyy" = "June/dd/yyyy" then Sheets("June").Select and so on for each
month. I know a longer way of accomplishing this but was just wondering how
to do it without all the code.

Thank you to anyone who helps and all you wonderful people out there that
make this discussion group so valuable by sharing all your knowledge!


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
Counting cells only if cell X equals "yes" Frustrated Excel Worksheet Functions 4 November 6th 09 05:59 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
if cell equals "a" then another cell would calculate percentage Brandy Excel Worksheet Functions 1 June 20th 08 05:18 PM
Sumif formula that uses "contains" rather than "equals" jerrymcm Excel Discussion (Misc queries) 4 October 2nd 07 05:15 PM
if cell contains string then make cell next to it equals "X" [email protected] Excel Programming 1 June 21st 06 06:09 PM


All times are GMT +1. The time now is 10:57 PM.

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

About Us

"It's about Microsoft Excel"