+ Reply to Thread
Results 1 to 7 of 7

lookup with IF LEFT function?

  1. #1
    Registered User
    Join Date
    01-09-2019
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    4

    lookup with IF LEFT function?

    Hello,

    I'm new to the site although I've referred to it a number of times and find it very useful.
    I'm hoping someone out there has can help me out...

    On the first sheet (Release) that displays store ordering schedules. The cells that have scheduled orders may say something different, but will begin with "Release Order."
    The 2nd sheet (Qty), that has daily ordering quantites for each store.
    On the 3rd sheet, I am using the IF(LEFT function to look at the Release sheet, and if the cell starts with "Rel" populate the cell with the corresponding quantity from the Qty sheet.
    This only works if stores and dates on the first two sheets are all aligned the same.

    Is there a way to do this with a lookup by store?
    I've attached an example of the data in the workbook (hopefully I did it correctly).
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,371

    Re: lookup with IF LEFT function?

    Maybe, put this on B2 on sheet "Release Day", then copied down and cross:

    =IF(INDEX(Release!$B$2:$H$11,MATCH($A2,Release!$A$2:$A$11,0),MATCH(B$1,Release!$B$1:$H$1,0))="","",INDEX(Qty!$B$2:$H$11,MATCH($A2,Qty!$A$2:$A$11,0),MATCH(B$1,Qty!$B$1:$H$1,0)))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-09-2019
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    4

    Re: lookup with IF LEFT function?

    Thanks azumi! This is exactly what I was looking for.

  4. #4
    Registered User
    Join Date
    01-09-2019
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    4

    Re: lookup with IF LEFT function?

    After playing with this a bit, I realize it's not exactly what I was looking for. The formula provided by Azumi pulls over the data from the 2nd sheet if there is anything in the cell on the 1st sheet. I originally used the 'left' function because there can be anything in the cells on the first sheet, and I only want the data if what's in the cell starts with "Rel". I've attached the same spreadsheet with other data in the cells of the 1st sheet.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: lookup with IF LEFT function?

    This proposal employs two helper tables which may be moved and/or hidden for aesthetic purposes.
    Notice that the store numbers and dates have been rearranged on the Release and Qty sheets so that the store numbers of the two tables are not aligned.
    The first helper table (B20:H29) is populated using: =INDEX(Release!$B$2:$H$11,MATCH($A20,Release!$A$2:$A$11,0),MATCH(B$19,Release!$B$1:$H$1,0))
    The second helper table (K20:Q29) is populated using: =INDEX(Qty!$B$2:$H$11,MATCH($A20,Qty!$A$2:$A$11,0),MATCH(K$19,Qty!$B$1:$H$1,0))
    The final table (red font) is populated using: =IF(LEFT(B20,3)="Rel",K20,"")
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    01-09-2019
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    4

    Re: lookup with IF LEFT function?

    Hi Jete, thanks for your response!

    I actually figured it out (by adapting Azumi's formula), but forgot to post the solution.

    Here it is if anyone's interested:
    =IF(LEFT(INDEX(Release!$B$2:$H$11,MATCH($A2,Release!$A$2:$A$11,0),MATCH(B$1,Release!$B$1:$H$1,0)),3)="Rel",INDEX(Qty!$B$2:$H$11,MATCH($A2,Qty!$A$2:$A$11,0),MATCH(B$1,Qty!$B$1:$H$1,0)),"")
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: lookup with IF LEFT function?

    Glad that you got a solution. Please take a moment to mark the thread as 'Solved' using the thread tools drop down above your first post. I hope that you have a blessed day.

+ 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. lookup going left based on function
    By bj in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 07:05 PM
  2. lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. [SOLVED] lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 02:05 PM
  5. lookup going left based on function
    By bj in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  6. lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. lookup going left based on function
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2005, 04:05 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