Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default IF formula - odd/even months and different names

Hi, I need to write a formula that shows different names for different
months. Like, in column A I will have months of the year and column B I will
have a scientist name. For €œodd€ months (Jan, Mar, May, Jul, Sep, Nov), I
want scientist A, for €œeven€ months (Feb, Apr, Jun, Aug, Oct, Dec)I want
scientist B. I usually use IF formula, but I am lost on this one. How do I do
that? Thanks a lot!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default IF formula - odd/even months and different names

Try this one out
=IF(MOD(MONTH(1&A1),2)=0,"Scientist B","Scientist A")
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"agatha" wrote:

Hi, I need to write a formula that shows different names for different
months. Like, in column A I will have months of the year and column B I will
have a scientist name. For €œodd€ months (Jan, Mar, May, Jul, Sep, Nov), I
want scientist A, for €œeven€ months (Feb, Apr, Jun, Aug, Oct, Dec)I want
scientist B. I usually use IF formula, but I am lost on this one. How do I do
that? Thanks a lot!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default IF formula - odd/even months and different names

You need to create a date value like 1 Jan 2008 to get the month number.
Then use the MOD function to get the even and odd months. there are a few
other methods that can accomplish the same results.

=IF(MOD(MONTH(DATEVALUE("1 "&A7&" "&YEAR(TODAY()))),2)=1,"Scientist
A","Scientist B")
"agatha" wrote:

Hi, I need to write a formula that shows different names for different
months. Like, in column A I will have months of the year and column B I will
have a scientist name. For €œodd€ months (Jan, Mar, May, Jul, Sep, Nov), I
want scientist A, for €œeven€ months (Feb, Apr, Jun, Aug, Oct, Dec)I want
scientist B. I usually use IF formula, but I am lost on this one. How do I do
that? Thanks a lot!

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
Sort Sheetnames when names are Months curiosity_killed_the_cat[_2_] Excel Discussion (Misc queries) 10 November 6th 07 12:07 PM
Formula to ave. last 3 months [email protected] Excel Worksheet Functions 2 March 24th 07 04:19 AM
How to use months in formula. Dave Dobson Excel Worksheet Functions 15 October 12th 06 05:22 PM
need if formula for 12 months blopreste3180 Excel Worksheet Functions 3 January 19th 06 05:40 PM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM


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

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"