+ Reply to Thread
Results 1 to 11 of 11

Formula with double IF statement

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Formula with double IF statement

    Hi,

    I would like some help with a formula where I am trying to get a date into a cell based on 3 criteria being met. I have attached the spreadsheet I am using.

    THE GOAL
    I would like Column L in UserByOpp to show the date that a certain widget was uploaded. The date the widget was uploaded is in the Resources worksheet. The two worksheets are linked by the Record Name (Column B in Resources and Column E in UserByOpp).

    The formula I need in Column L in UserByOpp is:

    Give me the date (Column K in Resources) where:

    - Column B in Resources = Column E in UserByOpp, AND
    - Column G in Resources = ABCWidget, AND
    - Column J in Resources = Uploaded

    Ideally I would like it so the formula runs automatically, using IF statements.

    Thank you so much in advance for any help.

    Jennsy
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-19-2013
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Formula with double IF statement

    Try this in column L, see if it is what you need...

    =IF(VLOOKUP([@[Record Name]],Resources!B:G,6,FALSE)="ABCWidget",IF(VLOOKUP([@[Record Name]],Resources!B:J,9,FALSE)="uploaded",VLOOKUP([@[Record Name]],Resources!B:K,10,FALSE)," ")," ")
    http://www.ExcelbyJoe.com

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula with double IF statement

    Maybe like this

    =IF(AND(VLOOKUP([@[Record Name]],Resources!B:G,6,0)="ABCWidget",VLOOKUP([@[Record Name]],Resources!B:J,9,0)="uploaded"),VLOOKUP([@[Record Name]],Resources!B:K,10,),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Formula with double IF statement

    Hi brocktoon93,

    Thanks for your help, much appreciated, the formula works great!

    However, I have now plugged that in to my real data and an issue has become apparent. It is likely that a Record Name will be in the Resources worksheet multiple times. If this is the case the formula misses the date for the ABCWidget unless that is the first one in Resources worksheet. I have uploaded the example of this, you will see that in UserByOpp the Record 3456aaa has no ABC Widget Uploaded date against it, but it should as it is in the Resources worksheet. Is there a way we can make sure this gets picked up?

    ABC_SpecialReport2.xlsx

    PS I added an ISERROR to the formula to remove #N/A results, as it is also possible that a record name does not exist in the Resources worksheet.

    Thanks,
    Jennsy
    Last edited by Jennsy; 09-14-2014 at 12:15 AM.

  5. #5
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Formula with double IF statement

    Hi AlKey,

    That formula works too, thanks for your help, much appreciated.

    But please see my note below, as I have encountered an issue with the real data.

    ====
    Hi,

    Thanks for your help, much appreciated, the formula works great!

    However, I have now plugged that in to my real data and an issue has become apparent. It is likely that a Record Name will be in the Resources worksheet multiple times. If this is the case the formula misses the date for the ABCWidget unless that is the first one in Resources worksheet. I have uploaded the example of this, you will see that in UserByOpp the Record 3456aaa has no ABC Widget Uploaded date against it, but it should as it is in the Resources worksheet. Is there a way we can make sure this gets picked up?

    ABC_SpecialReport2.xlsx

    PS I added an ISERROR to the formula to remove #N/A results, as it is also possible that a record name does not exist in the Resources worksheet.

    Thanks,
    Jennsy

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula with double IF statement

    Try this

    Since you are using Excel 2007, you don't need to use ISERROR. You can now use a more efficient function such as IFERROR

    Also, I have noticed that you using " " to show blank cell. Please note that this adds space in the cell. Instead use "".

    =IFERROR(INDEX(Table2[Date (PST)],MATCH(1,INDEX((Table2[Widget]="ABCWidget")*(Table2[Record Name]=Table3[@[Record Name]]),,),0),MATCH("Uploaded",Table2[Action],0)),"")
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Formula with double IF statement

    Hi Alkey,

    Thanks so much, nearly there! The only issue now is that in UserByOpp I am getting an ABC Widget Uploaded Date in row 8 (for record 789aaa), but this should not be there. If you look in the Resources worksheet for record 789aaa (row 6) you will see that the Widget is ABCWidget, but it was Downloaded, not uploaded. So that date should not show in the UserByOpp worksheet. Is there an easy fix for this?

    Thank you for all your help, really is appreciated.

    Jennsy

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula with double IF statement

    Ok, what dates should be returned?

  9. #9
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Formula with double IF statement

    Hi,

    Okay, so at the moment 3 dates are returned in UserByOpps. The top 2 are correct, in rows 4 and 5. The one in row 8 should not be there, as that is the date the ABCWidget was downloaded for that record, not uploaded. Does that help?

    Thanks

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula with double IF statement

    =IFERROR(1/(1/(SUMPRODUCT((Resources!$B$2:$B$9=E2)*(Resources!$G$2:$G$9="ABCWidget")*(Resources!$J$2:$J$9="Uploaded")*(Resources!$K$2:$K$9)))),"")

  11. #11
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Formula with double IF statement

    Alkey, you are a genius! Thanks

+ 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. [SOLVED] Double If statement help
    By ScabbyDog in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2013, 01:18 PM
  2. Double IF statement
    By revenge4ash89 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-16-2011, 09:46 AM
  3. Double If Statement Help
    By vargs in forum Excel General
    Replies: 3
    Last Post: 12-08-2010, 09:57 AM
  4. Double if statement??
    By txbullets in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2008, 08:57 PM
  5. [SOLVED] Double if statement
    By bastien86 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2006, 02:35 PM

Tags for this Thread

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