+ Reply to Thread
Results 1 to 6 of 6

Nesting IF statements

Hybrid View

penny Nesting IF statements 10-03-2007, 03:15 PM
VBA Noob Maybe ... 10-03-2007, 03:20 PM
penny Thank you for your quick... 10-03-2007, 03:44 PM
VBA Noob Sorry, Didn't test. ... 10-03-2007, 03:50 PM
penny Thank you, the choose formula... 10-03-2007, 04:01 PM
VBA Noob Glad it helped Here's... 10-03-2007, 04:02 PM
  1. #1
    Registered User
    Join Date
    03-26-2007
    Posts
    92

    Nesting IF statements

    Hello -

    Range C3:C100 have dates (MM/DD/YY format) listed. I am looking for a formula to enter in B3:B100 that will check C3:C100; if it is between 01/01/07 & 01/31/07, it will put "January" as the result; if it is between 02/01/07 & 02/28/07 it will put February as the result; if it is between 03/01/07 & 03/31/07 it will put March as the result; this would continue through December. Is there a way for me to nest many IF statements to accomplish this or is there another formula that would accomplish this?

    I am using 2003.

    Thank you!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =TEXT(MONTH(C3),"mmmm")

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    Thank you for your quick response!

    I tried what you suggested, however, it's always returning January as the answer, regardless of the month it's in.

    If I do =MONTH(C3) (or C4, C5, etc.), it does return the correct numerical month (i.e. 2 for February, 9 for September, etc.).

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sorry,

    Didn't test.

    Quickest way is enter =C3 in B3 then custom format as "mmmm"
    or you could use

    =CHOOSE(MONTH(C3),"January","February","March","April","May","June","July","August","September","October","November","December")

    VBA Noob

  5. #5
    Registered User
    Join Date
    03-26-2007
    Posts
    92
    Thank you, the choose formula worked perfectly!

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad it helped

    Here's another way

    =TEXT(C3,"MMMM")

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1