+ Reply to Thread
Results 1 to 2 of 2

Sort receipts based on their dates - Problem with a nested function.

Hybrid View

gubiithefish Sort receipts based on their... 09-21-2014, 04:42 PM
Richard Buttrey Re: Sort receipts based on... 09-21-2014, 04:59 PM
  1. #1
    Registered User
    Join Date
    09-21-2014
    Location
    Århus, Denmark
    MS-Off Ver
    2007
    Posts
    1

    Sort receipts based on their dates - Problem with a nested function.

    Hello Excel Forum!

    This is officially my first post in this forum, so I hope I'm not making a fool out of myself, and I obviously hope that you can help me! - I am usually not a person who asks for help, since I prefer to figure things out by myself. But! After a whole day searching the internet for answers, I find myself defeated, and this is my way of accepting it. - Anyhow! Let me introduce you to my problem.

    I am currently working with 2 sheets in Excel 2007, but I made a similar model on Google Docs, so that my roommates can see it as well - You can all see it here http://goo.gl/wzYuzU

    1. "KvitteringerSeptember" With my two roommates and my receipts.
    2. "Fordeling" All the food products named on the receipts sorted by date.

    We have more than just food on the receipts, so we have to copy + paste our food into my first sheet.
    But as we copy it onto the first sheet, I want to see which date of the receipts it belongs to, with the following function:

    =if(B3=KvitteringerSeptember!$A$6=true,KvitteringerSeptember!$A$2,
    B3 = CopyPasted food in my 1st sheet
    A6 = Name of the food from my 2nd sheet
    A2 = The date of the receipt of which the food have been bought.

    Since I have multiple receipts, then I'm going to have multiple dates, which I solved by adding more functions to my function (Nested function)

    =if(B2=KvitteringerSeptember!$A$6=true,KvitteringerSeptember!$A$2,if(B2=KvitteringerSeptember!$C$6=true,KvitteringerSeptember!$C$2,if(B2=KvitteringerSeptember!$E$6=true,KvitteringerSeptember!$E$2...
    And until the end... f(B8=KvitteringerSeptember!$Y$6=true,KvitteringerSeptember!$Y$2,A7)))))))))))))
    This method isn't that efficient as you might see.

    1. I can only add the first food product of the receipts (As you can see in the code)
    1.1 Which is why I have the final [Value_if_false] to A7, as in the previous date.
    2.I have to write another IF function for each new receipt, which is rather confusing.
    3. If it compares a product from the first receipt with an old product, then it's obviously going to return with the date of the first product.
    - Which I was trying to avoid by adding the function [Greater than or equal to] before every date, so that the previous receipts dates would be lesser than the actual receipt it is comparing it to. (Without luck though!)

    Anyone who have any ideas how to optimize these functions?
    - Share a guide for a better way to sort this out?
    - Or at least implement my [Greater than or equal to] function into my nested function?

    Looking forward to hear from you, thanks for reading!
    - Sincerely GubiiTheFish

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sort receipts based on their dates - Problem with a nested function.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Creating Receipts Based On List...
    By girt0n in forum Excel General
    Replies: 1
    Last Post: 07-09-2012, 12:42 AM
  2. Generate Receipts based on List
    By vandanavai in forum Excel General
    Replies: 1
    Last Post: 12-17-2007, 10:07 AM
  3. nested if function problem
    By headache in forum Excel General
    Replies: 7
    Last Post: 01-10-2007, 06:05 PM
  4. Problem with nested if function. PLS HELP
    By sfar007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2006, 06:34 AM
  5. Problem using SUM() function with nested IF()
    By JWeb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-21-2005, 04:04 PM

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