+ Reply to Thread
Results 1 to 6 of 6

Multiple IF and And Function Help Needed!!

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    Limerick
    MS-Off Ver
    Excel 2010
    Posts
    8

    Multiple IF and And Function Help Needed!!

    Hi,

    I need help completing an IF or And formula for my data attached.

    I have entered a Formula =IF(AND(B2="Debit"),"Debit/Credit's",IF(AND(B2="Standard"),"Standard Invoice",IF(AND(B2="Prepayment"),"Prepayment",IF(AND(B2="Credit"),"Debit/Credit's",1)))) in Cell F2 that returns me a value if cell B2 is a specific Invoice Type. However I need to build on this Formula for results that are Standard Invoice's Only.

    So if its a Standard Invoice and Column C is "N" then I need to return "Complete"

    and if its "Y" is the tricky part as:

    I then need to look at the Column D "Due Date" to see if the Date is less than today's date in H1 and return "Overdue", or If it is between today's date and today's date +7 return "Due within 7 Day's" and finally if it is greater than today's Date + 7 return "Due Greater than 7 Day's".

    Im not sure if such a formula is possible but any help I could get on this would be great as this is something I have to manually break out each day for 20,000 + Lines

    Thanks in Advance

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Multiple IF and And Function Help Needed!!

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

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

    Re: Multiple IF and And Function Help Needed!!

    First of all, you don't need any of the AND functions in your formula - that is used when you have two or more conditions that each have to be satisfied, but in your case you only have one condition each time. So, the formula you have now can be simplified to this (I've re-arranged it slightly):

    =IF(OR(B2="Debit",B2="Credit"),"Debit/Credit's",IF(B2="Prepayment","Prepayment",IF(B2="Standard","Standard Invoice","")))

    So now we just have to incorporate your other requirements at the end of this formula.

    I'm just about to take a break, so I'll look at it later.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-26-2013
    Location
    Limerick
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Multiple IF and And Function Help Needed!!

    Hi Olly,

    Thanks so much for looking at this for me. Your formula works for everything apart form the Invoice type "Credit" where it brings in a blank instead of "Debit/Credit's"?

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

    Re: Multiple IF and And Function Help Needed!!

    Okay, using the earlier formula that I posted, you can extend it like this:

    =IF(OR(B2="Debit",B2="Credit"),"Debit/Credit's",IF(B2="Prepayment","Prepayment",IF(B2="Standard",IF(C2="N","Complete",IF(D2<$H$1,"Overdue",IF(D2<$H$1+7,"Due within 7 days","Due greater than 7 days"))),"")))

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    11-26-2013
    Location
    Limerick
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Multiple IF and And Function Help Needed!!

    Hi Pete,

    Thanks so much for looking at this for me. Your formula has worked perfectly.

    Thanks
    David

+ 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. multiple columns multiple data needed
    By bjeiten in forum Excel General
    Replies: 3
    Last Post: 08-23-2012, 03:42 AM
  2. IF function on multiple levels needed
    By In Love With in forum Excel General
    Replies: 4
    Last Post: 07-12-2010, 02:49 AM
  3. Help needed with function
    By Kevin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2006, 02:35 AM
  4. Replies: 2
    Last Post: 12-16-2005, 11:45 AM
  5. Function Help Needed
    By Harvey Gersin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-29-2005, 07:10 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