+ Reply to Thread
Results 1 to 6 of 6

Indexing with alternate criteria

  1. #1
    Registered User
    Join Date
    10-22-2021
    Location
    Springfield, Missouri
    MS-Off Ver
    365
    Posts
    14

    Indexing with alternate criteria

    I need further assistance with the problem of indexing in prices into an auto-fill form based on either a standard or discounted cost. I have tried
    several formulas and none seem to give me the answer I am looking for. I have attached a sample workbook. I appreciate the assistance. Thanks.
    Attached Files Attached Files

  2. #2
    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
    31,523

    Re: Indexing with alternate criteria

    Why haven't you a Price file totally independent of the Order form? Your format is far from ideal, not least because the VLOOKUP reference for the Part No: (and other data) - it is "hard-coded"

    =VLOOKUP($C$3,'PART ORDER LOG'!$A:$BJ,15,FALSE)
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    10-22-2021
    Location
    Springfield, Missouri
    MS-Off Ver
    365
    Posts
    14

    Re: Indexing with alternate criteria

    <Why haven't you a Price file totally independent of the Order form? Your format is far from ideal, not least because the VLOOKUP reference for the Part No: (and other data) - it is "hard-coded">

    The price file is actually on a separate tab and is hidden along with some other tabs that weren't pertinent to the posting.
    The formula you provided returns the part 2 number. It doesn't address the original question.

    =VLOOKUP($C$3,'PART ORDER LOG'!$A:$BJ,15,FALSE)returns "NC-LD80-28". I need a formula that will return either the Standard Price or Discounted price based on whether
    Column F on the form is an "S" or a "D".

  4. #4
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Indexing with alternate criteria

    I'm a bit confused by your sheet. It seems like you probably just need an IF() clause to choose between 13, 18, 23 in your existing formula. But I'm not sure what it should actually be since you say you are choosing between two input values (S and D) but have 3 options as the output (13, 18, 23).

    I'd also make the same point as John, that hard-coding the column number is not a very robust way of doing things in a big sheet like this. If a column gets added somewhere you need to change a bunch of numbers. I'd suggest either using a MATCH to get the column reference or using XLOOKUP instead of VLOOKUP.

  5. #5
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Indexing with alternate criteria

    Oh actually think I get it now, each row adds 5 columns to the right but as well as that you are choosing between PR and DP.

    In which case try something like this in D15:

    =VLOOKUP($C$3,'PART ORDER LOG'!$A:$BJ,IF(F15="S",13,IF(F15="D",14))+5*(ROW(D15)-ROW($D$15)),FALSE)

  6. #6
    Registered User
    Join Date
    10-22-2021
    Location
    Springfield, Missouri
    MS-Off Ver
    365
    Posts
    14

    Re: Indexing with alternate criteria

    This formula worked perfectly. Thank you so much.

+ 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. [SOLVED] Indexing Value based on Criteria within a single cell
    By ahuang3433 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2020, 05:49 AM
  2. Replies: 1
    Last Post: 03-08-2018, 12:23 PM
  3. Indexing to an external reference based on multiple criteria
    By kschmit1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-08-2017, 05:41 AM
  4. Indexing with Multiple Criteria and Blank Cells
    By timtomm66 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-22-2014, 02:52 PM
  5. [SOLVED] Trouble with indexing multiple criteria with a date range
    By kunjanee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-19-2013, 04:32 PM
  6. Replies: 4
    Last Post: 12-06-2011, 03:01 PM
  7. Indexing and matching multiple criteria
    By Dbeethekidd in forum Excel General
    Replies: 8
    Last Post: 09-02-2009, 08:22 AM

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