+ Reply to Thread
Results 1 to 15 of 15

Horizontal and vertical lookup then display number

  1. #1
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Horizontal and vertical lookup then display number

    Hi All!

    I have a file that I'd like to sales numbers from another tab within the excel file.

    Ex:

    excel.JPG

    I'd like the numbers be pulled by the SKU # and display under the month in the Sales LY row.

    Looking for a formula.

    THANK YOU!

  2. #2
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Horizontal and vertical lookup then display number

    VLOOKUP or SUMIFS

    Edit: Actually not VLOOKUP, SUMIFS is likely your best choice, hard to say because I cant see source data. We also cannot deduce things like data type, format, underlying formulas/patterns, etc from a picture. A sanitized sample file would be best

  3. #3
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    My source data goes
    QTY
    H11 33
    H22 51

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Horizontal and vertical lookup then display number

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    I've attached. Hopefully it worked.

    All I want is for my Data tab to feed into my forecast tab.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Horizontal and vertical lookup then display number

    This should get you started. In D2:

    =INDEX('October data'!C$2:C$4,MATCH(FORECAST!B2,'October data'!$A$2:$A$4,0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Horizontal and vertical lookup then display number

    IN D2,

    =IFERROR(SUMPRODUCT((INDIRECT("'"&D$1&" data'!$B$2:$B$9")=$A2)*(INDIRECT("'"&D$1&" data'!$A$2:$A$9")=$B2)*(INDIRECT("'"&D$1&" data'!$C$2:$C$9"))),"")

    then copy to other cells.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    Perfect! Thank you! Any chance either you can explain the detials of each part of the formula?
    THANK YOU!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Horizontal and vertical lookup then display number

    Which one?

  10. #10
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    Why did you use Index, or what does indirect mean in a formula.

  11. #11
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    Actually the second one doesn't work, it pulls the number 2 in each yellow row.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Horizontal and vertical lookup then display number

    Here's an explanation of mine:

    =INDEX('October data'!C$2:C$4,MATCH(FORECAST!B2,'October data'!$A$2:$A$4,0))

    Find a value in 'October data'!C$2:C$4 ...

    =INDEX('October data'!C$2:C$4,MATCH(FORECAST!B2,'October data'!$A$2:$A$4,0))

    ... that is on the row in 'October data'!$A$2:$A$4 that matches with FORECAST!B2.

    =INDEX('October data'!C$2:C$4,MATCH(FORECAST!B2,'October data'!$A$2:$A$4,0))

    Make sure it's an exact match.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Horizontal and vertical lookup then display number

    The other formula offered works perfectly - you do need to add tabs for November and December, however! Perhaps you copied and pasted the formula instead of the whole cell? If so, you will need to adjust the references for each row. Much easier if you simply copy and paste the whole cell, then Excel will make the changes for you.

  14. #14
    Registered User
    Join Date
    09-02-2016
    Location
    canada
    MS-Off Ver
    365
    Posts
    22

    Re: Horizontal and vertical lookup then display number

    What is the other file had months at the top. Is it possible to then match the SKU by month to the second tab?
    Attached Files Attached Files

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Horizontal and vertical lookup then display number

    In D2 and copy across:

    =IFERROR(SUMPRODUCT(('October data'!$B$2:$B$4=$A2)*('October data'!$A$2:$A$4=$B2)*('October data'!$C$1:$E$1=D$1)*('October data'!$C$2:$E$4)),"")

    Select D2 to F2 - copy - select D5 to F5 - paste - select D8 to F8 - paste again.

+ 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. Replies: 16
    Last Post: 06-01-2017, 06:01 PM
  2. [SOLVED] lookup if my lookup array with my data position is vertical and horizontal
    By daboho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-29-2015, 05:35 AM
  3. [SOLVED] VBA Vertical and horizontal Lookup ???
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-07-2014, 06:15 PM
  4. [SOLVED] Lookup a vertical and horizontal value
    By KARENKERBA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 04:33 PM
  5. Horizontal and Vertical lookup.
    By rlsublime in forum Excel General
    Replies: 3
    Last Post: 09-05-2012, 05:54 PM
  6. Display Vertical Data on one horizontal line
    By DMBeer41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2012, 05:38 PM
  7. Display Excel list from vertical to horizontal
    By Yan in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-04-2006, 04:50 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