+ Reply to Thread
Results 1 to 8 of 8

How do I get a cell to give a result based on the month we are in?

  1. #1
    SHBmgr
    Guest

    How do I get a cell to give a result based on the month we are in?

    I want to calculate the % difference between actual and goal for the month we
    are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    April). In other words, the answer for J1 will reflect whatever month we are
    currently in. If you open up the spreadsheet in July it will be J1=H1/I1. I
    think the formula may involve the TODAY function but I am not sure.


    A B C D E F G H I
    J
    Jan Feb Mar April May June July Goal % Diff
    1 Product 1
    2 Product 2

  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
    gives you the current month

    =MONTH(TODAY())

  3. #3
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Hi!

    If you month headers are in row 1 then the numeric data is is row 2.

    Also, which is which:

    =I1/C1
    =I1/E1
    =H1/I1

    Is it goal/value or value/goal ?

    Anyhow:

    For goal/value, month headers in row 1:

    =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))

    Biff

    "SHBmgr" <[email protected]> wrote in message
    news:[email protected]...
    >I want to calculate the % difference between actual and goal for the month
    >we
    > are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    > April). In other words, the answer for J1 will reflect whatever month we
    > are
    > currently in. If you open up the spreadsheet in July it will be J1=H1/I1.
    > I
    > think the formula may involve the TODAY function but I am not sure.
    >
    >
    > A B C D E F G H I
    > J
    > Jan Feb Mar April May June July Goal % Diff
    > 1 Product 1
    > 2 Product 2




  4. #4
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Oh, something I just noticed:

    >Jan Feb Mar April May June July


    The format needs to be the same throughout:

    Either all are:

    Jan.....Feb.....Mar.....Apr.....May.....Jun.....Jul

    Or, all are:

    January...February...March...April...May...June...July

    Which ever way you choose, adjust this portion of the formula as
    appropriate:

    TEXT(TODAY(),"mmm")

    For the short month name use the above, for the long month name use:

    TEXT(TODAY(),"mmmm")

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you month headers are in row 1 then the numeric data is is row 2.
    >
    > Also, which is which:
    >
    > =I1/C1
    > =I1/E1
    > =H1/I1
    >
    > Is it goal/value or value/goal ?
    >
    > Anyhow:
    >
    > For goal/value, month headers in row 1:
    >
    > =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))
    >
    > Biff
    >
    > "SHBmgr" <[email protected]> wrote in message
    > news:[email protected]...
    >>I want to calculate the % difference between actual and goal for the month
    >>we
    >> are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    >> April). In other words, the answer for J1 will reflect whatever month we
    >> are
    >> currently in. If you open up the spreadsheet in July it will be
    >> J1=H1/I1. I
    >> think the formula may involve the TODAY function but I am not sure.
    >>
    >>
    >> A B C D E F G H I
    >> J
    >> Jan Feb Mar April May June July Goal % Diff
    >> 1 Product 1
    >> 2 Product 2

    >
    >




  5. #5
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Oh, something I just noticed:

    >Jan Feb Mar April May June July


    The format needs to be the same throughout:

    Either all are:

    Jan.....Feb.....Mar.....Apr.....May.....Jun.....Jul

    Or, all are:

    January...February...March...April...May...June...July

    Which ever way you choose, adjust this portion of the formula as
    appropriate:

    TEXT(TODAY(),"mmm")

    For the short month name use the above, for the long month name use:

    TEXT(TODAY(),"mmmm")

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you month headers are in row 1 then the numeric data is is row 2.
    >
    > Also, which is which:
    >
    > =I1/C1
    > =I1/E1
    > =H1/I1
    >
    > Is it goal/value or value/goal ?
    >
    > Anyhow:
    >
    > For goal/value, month headers in row 1:
    >
    > =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))
    >
    > Biff
    >
    > "SHBmgr" <[email protected]> wrote in message
    > news:[email protected]...
    >>I want to calculate the % difference between actual and goal for the month
    >>we
    >> are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    >> April). In other words, the answer for J1 will reflect whatever month we
    >> are
    >> currently in. If you open up the spreadsheet in July it will be
    >> J1=H1/I1. I
    >> think the formula may involve the TODAY function but I am not sure.
    >>
    >>
    >> A B C D E F G H I
    >> J
    >> Jan Feb Mar April May June July Goal % Diff
    >> 1 Product 1
    >> 2 Product 2

    >
    >




  6. #6
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Oh, something I just noticed:

    >Jan Feb Mar April May June July


    The format needs to be the same throughout:

    Either all are:

    Jan.....Feb.....Mar.....Apr.....May.....Jun.....Jul

    Or, all are:

    January...February...March...April...May...June...July

    Which ever way you choose, adjust this portion of the formula as
    appropriate:

    TEXT(TODAY(),"mmm")

    For the short month name use the above, for the long month name use:

    TEXT(TODAY(),"mmmm")

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you month headers are in row 1 then the numeric data is is row 2.
    >
    > Also, which is which:
    >
    > =I1/C1
    > =I1/E1
    > =H1/I1
    >
    > Is it goal/value or value/goal ?
    >
    > Anyhow:
    >
    > For goal/value, month headers in row 1:
    >
    > =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))
    >
    > Biff
    >
    > "SHBmgr" <[email protected]> wrote in message
    > news:[email protected]...
    >>I want to calculate the % difference between actual and goal for the month
    >>we
    >> are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    >> April). In other words, the answer for J1 will reflect whatever month we
    >> are
    >> currently in. If you open up the spreadsheet in July it will be
    >> J1=H1/I1. I
    >> think the formula may involve the TODAY function but I am not sure.
    >>
    >>
    >> A B C D E F G H I
    >> J
    >> Jan Feb Mar April May June July Goal % Diff
    >> 1 Product 1
    >> 2 Product 2

    >
    >




  7. #7
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Oh, something I just noticed:

    >Jan Feb Mar April May June July


    The format needs to be the same throughout:

    Either all are:

    Jan.....Feb.....Mar.....Apr.....May.....Jun.....Jul

    Or, all are:

    January...February...March...April...May...June...July

    Which ever way you choose, adjust this portion of the formula as
    appropriate:

    TEXT(TODAY(),"mmm")

    For the short month name use the above, for the long month name use:

    TEXT(TODAY(),"mmmm")

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you month headers are in row 1 then the numeric data is is row 2.
    >
    > Also, which is which:
    >
    > =I1/C1
    > =I1/E1
    > =H1/I1
    >
    > Is it goal/value or value/goal ?
    >
    > Anyhow:
    >
    > For goal/value, month headers in row 1:
    >
    > =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))
    >
    > Biff
    >
    > "SHBmgr" <[email protected]> wrote in message
    > news:[email protected]...
    >>I want to calculate the % difference between actual and goal for the month
    >>we
    >> are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    >> April). In other words, the answer for J1 will reflect whatever month we
    >> are
    >> currently in. If you open up the spreadsheet in July it will be
    >> J1=H1/I1. I
    >> think the formula may involve the TODAY function but I am not sure.
    >>
    >>
    >> A B C D E F G H I
    >> J
    >> Jan Feb Mar April May June July Goal % Diff
    >> 1 Product 1
    >> 2 Product 2

    >
    >




  8. #8
    Biff
    Guest

    Re: How do I get a cell to give a result based on the month we are in?

    Oh, something I just noticed:

    >Jan Feb Mar April May June July


    The format needs to be the same throughout:

    Either all are:

    Jan.....Feb.....Mar.....Apr.....May.....Jun.....Jul

    Or, all are:

    January...February...March...April...May...June...July

    Which ever way you choose, adjust this portion of the formula as
    appropriate:

    TEXT(TODAY(),"mmm")

    For the short month name use the above, for the long month name use:

    TEXT(TODAY(),"mmmm")

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you month headers are in row 1 then the numeric data is is row 2.
    >
    > Also, which is which:
    >
    > =I1/C1
    > =I1/E1
    > =H1/I1
    >
    > Is it goal/value or value/goal ?
    >
    > Anyhow:
    >
    > For goal/value, month headers in row 1:
    >
    > =IF(I2="","",I2/INDEX(B2:H2,MATCH(TEXT(TODAY(),"mmm"),B1:H1,0)))
    >
    > Biff
    >
    > "SHBmgr" <[email protected]> wrote in message
    > news:[email protected]...
    >>I want to calculate the % difference between actual and goal for the month
    >>we
    >> are in. i.e. J1=I1/C1(when we are in Feb), or J1=I1/E1(when we are in
    >> April). In other words, the answer for J1 will reflect whatever month we
    >> are
    >> currently in. If you open up the spreadsheet in July it will be
    >> J1=H1/I1. I
    >> think the formula may involve the TODAY function but I am not sure.
    >>
    >>
    >> A B C D E F G H I
    >> J
    >> Jan Feb Mar April May June July Goal % Diff
    >> 1 Product 1
    >> 2 Product 2

    >
    >




+ 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