+ Reply to Thread
Results 1 to 17 of 17

Index a datasheet to create an invoice using 1 criterion

  1. #1
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Index a datasheet to create an invoice using 1 criterion

    Hi

    I am trying to create an Invoice that will pull data for specific months and outputs the corresponding values horizontally and vertically - i have tried using INDEX in an array formula but i am struggling and to be honest i do not even know if this can be done using formulas in MS Excel so thought I would ask for some assistance.

    I have attached some test data and will outline the problem.

    1. The worksheet is split into 2 tabs (DataSheet and Invoice)

    2. If you click on the drop down in Cell N10 on the Invoice Tab and select a month it will populate all of the rows from C16 to C40 and across to Column M with all entries that have a value for that month by pulling from the DataSheet and those cells which don't have a month in the adjacent column to be ignored.

    3. The DataSheet has been created so that each value starting from Column E has a Month Invoiced box on the right hand side and I have used colours to identify where the data in pulling from on both the DataSheet and Invoice worksheets.

    Any assistance would be greatly appreciated.

    Many Thanks

    Peter
    Attached Files Attached Files
    Last edited by peterjames; 06-08-2020 at 10:21 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index a datasheet to create an invoice using 1 criterion

    I would be inclined to do the following (assumes XL2010):

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for the remaining fields I would just use INDEX/MATCH using the value in Col A,
    note: if, per your sample, your data is sorted by Site # you can (for remaining fields) use MATCH(A16,DataSheet!$A$4:$A$14) rather than an exact match (,0) - as will be faster

  3. #3
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Thanks so much for the response - i will try this and will get back to you.

    Many Thanks

    Peter

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index a datasheet to create an invoice using 1 criterion

    Peter, in retrospect, it needs a tweak - apologies...

    Revised:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and, for completeness, the below would populate the remainder of the matrix:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Hi Xlent

    Just tried the formulas and it seems be be doing a count and not pulling the values through, i may be something wrong, just uploaded another attachment called Test_Data-2, if you could have a look it would be greatly appreciated.

    Many Thanks

    Peter

  6. #6
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    No apologies necessary - just tried it and it works, thanks so much Xlent, you have really helped me out Peter

  7. #7
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Sorry to bother you again - just tried it and when i change the month in N10 its putting all the values in for the site number rather than the specific value . ie the uploaded attachment (test data 2) has Birmingham at £150 for October but its putting all the values for the whole site on the Matrix B16:M40.

    Do i need to tweak it a bit more so it only pulls those months?

    Many Thanks

    Peter
    Attached Files Attached Files
    Last edited by peterjames; 06-08-2020 at 11:40 AM.

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index a datasheet to create an invoice using 1 criterion

    Oh dear, another error on my part I'm afraid.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    edit: or if you prefer a SUMIFS type approach
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    SUMPRODUCT (below) would be a little more succinct (syntax wise) but a little less efficient.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by XLent; 06-08-2020 at 12:01 PM.

  9. #9
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Just tried it - it works perfect, thanks so much for your help Peter

  10. #10
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index a datasheet to create an invoice using 1 criterion

    No problem - apologies for the errors.

  11. #11
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    No apologies required - you really helped me out

  12. #12
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Apologies for bothering you - just spotted something when i was testing the formulas - i have uploaded test data 3 - and if you look at the Invoice tab i have selected Oct-20 - however Site Number 2 is not showing even though there is an invoiced date in Cell L6. What I also noticed is if i put an entry in Cell I6 and J6 it will then put the info on the invoice for that entry and the missing one as well, are you able to assist me with this please
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Hi Xlent - I have fixed this - thanks so much for your help Peter

  14. #14
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Xlent - Just added the latest attachment - the issue i thought i fixed is still showing - any help would be appreciated. Many Thanks Peter
    Attached Files Attached Files

  15. #15
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index a datasheet to create an invoice using 1 criterion

    yet another error I'm afraid... when I added in the N test I should have modified k from ROWS to a constant of 1

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Thanks XLent - really appreciate you help with this - will add that line into the sheet

  17. #17
    Registered User
    Join Date
    04-25-2017
    Location
    Birmingham
    MS-Off Ver
    2016
    Posts
    47

    Re: Index a datasheet to create an invoice using 1 criterion

    Everything is now working fine - thanks again for your assistance

+ 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. Create customer Invoice in sep spreadsheet, using 'Create Invoice' 'Button'
    By J stacey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2015, 11:45 AM
  2. Find value based on item number (first criterion) and date (second criterion)
    By ivan.stajin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2014, 10:47 AM
  3. how to create checked and unchecked checkboxes based on three criterion?
    By pejoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2014, 09:37 PM
  4. VBA for display Various Datasheet data in Masterdatasheet when we choose datasheet name
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-08-2014, 10:21 AM
  5. Create dynamic tables from datasheet
    By swiftrain in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2013, 08:44 AM
  6. create a countif with multiple criterion
    By Kaplan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2011, 04:29 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