+ Reply to Thread
Results 1 to 2 of 2

If statement with a followup If based on the results of the first in the same cell.

  1. #1
    Registered User
    Join Date
    02-15-2017
    Location
    Florida
    MS-Off Ver
    2016
    Posts
    1

    If statement with a followup If based on the results of the first in the same cell.

    I know the title didn't help a whole lot. Let me explain what i'm trying to do.

    I'm working on spend tracking spreadsheet, and one of the clients rebates is based on spend per quarter. I'm using the following formula to look at today's date and determine what quarter the date falls in, and then provide the sum of that particular quarter.
    =IF(TODAY()<=1/1/2017>=3/31/2017,SUM(D2:D4),IF(TODAY()<=4/1/2017>=6/30/2017,SUM(D5:D7), IF(TODAY()<=7/1/2017>=9/30/2017,SUM(d8:D10),SUM(D11:D13))))
    This part of the formula works fine. I need to take the resulting sum and compare it against another table that compares spend level to the associated rebate level, and return the rebate level amount.

    How can I build this into one cell so that my second function (another series of nested If statements) takes the results of the first section and compares it against the spend level table to return the correct rebate amount? I know I can use this result as a "helper column" for a second set of formulas, but if i can keep it in one cell I'd like to.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,435

    Re: If statement with a followup If based on the results of the first in the same cell.

    I'm surprised that the formula does produce the correct results, as this part:

    =IF(TODAY()<=1/1/2017>=3/31/2017 ...

    doesn't make sense. Nor do the other similar IF statements elsewhere in the formula. You need to write that part like this:

    =IF(AND(TODAY()>=--"1/1/2017",TODAY()<=--"3/31/2017") ....

    to determine if it is in the first quarter of this year, although it would be better like this:

    =IF(AND(TODAY()>=DATE(2017,1,1),TODAY()<=DATE(2017,3,31)) ...

    I think you need to get this right before thinking about the other part of your question.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Color Cell Based on Specific Text in Other Cell and Sorting Based on Results
    By kre30a in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2016, 07:51 PM
  2. If statement concatenates results into 1 cell - Programming Try
    By Karroog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2014, 03:35 AM
  3. If statement concatenates results into 1 cell
    By Karroog in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2014, 02:37 PM
  4. [SOLVED] How to pull data based on Filtered results - To create Statement of Account
    By ec4excel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-28-2013, 11:36 AM
  5. Creating a list based on the results of an IF Statement
    By tcrjmom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2013, 07:16 PM
  6. Vlookup using cell with results of if statement
    By gisawear in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2012, 05:53 AM
  7. Replies: 3
    Last Post: 07-25-2012, 07:54 AM

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