+ Reply to Thread
Results 1 to 11 of 11

Return Value Based on Criteria

  1. #1
    Registered User
    Join Date
    07-09-2020
    Location
    Hampshire
    MS-Off Ver
    365
    Posts
    20

    Return Value Based on Criteria

    Morning All

    Can you please advise the formula to return a value based on the below please.

    If Line 2 for example has 5 units and is of type X and X = £0.06, the value should be returned as £0.30

    Thanks in advance
    John
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    697

    Re: Return Value Based on Criteria

    Use vlookup function if you dont want to retain show the X and Y values.

    A2*VLOOKUP(B2,{"x","0.06";"y","0.11"},2,0)

    Else

    A2*IF(B2="x",RIGHT($C$8,SEARCH(" ",$C$8)+2),RIGHT($C$9,SEARCH(" ",$C$9)+2))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2020
    Location
    Hampshire
    MS-Off Ver
    365
    Posts
    20

    Re: Return Value Based on Criteria

    Hi Shareez

    Many thanks but not working for me. I assume i am copying and pasting your formula into C2?

    Thanks
    John

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,518

    Re: Return Value Based on Criteria

    C2 cell formula , Drag down

    HTML Code: 

  5. #5
    Registered User
    Join Date
    07-09-2020
    Location
    Hampshire
    MS-Off Ver
    365
    Posts
    20

    Re: Return Value Based on Criteria

    Perfect, many thanks wk9128

  6. #6
    Registered User
    Join Date
    07-09-2020
    Location
    Hampshire
    MS-Off Ver
    365
    Posts
    20

    Re: Return Value Based on Criteria

    Hi Again

    wk9128's formula worked perfectly, but if i try to add a further or change the array it falls over.

    i have attached my actual worksheet and deleted and sensitive material. The only one that works is ETD, what am i doing wrong?

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,518

    Re: Return Value Based on Criteria

    J4 cell formula
    HTML Code: 
    Because LOOKUP Function must be sorted first

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,138

    Re: Return Value Based on Criteria

    The lookup formula must be in alphabetical order
    =F4*(LOOKUP(I4,{"DOGS","ETD","RAY"},{0.15,0.11,0.06}))

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,518

    Re: Return Value Based on Criteria

    Thank you Fluff13 , you are right
    So fast, not ready to sort, your answer has been posted
    Last edited by wk9128; 10-08-2020 at 09:06 AM.

  10. #10
    Registered User
    Join Date
    07-09-2020
    Location
    Hampshire
    MS-Off Ver
    365
    Posts
    20

    Re: Return Value Based on Criteria

    Thanks so much both, simple when you know i guess

    Many thanks and have a fab rest of day.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,138

    Re: Return Value Based on Criteria

    Glad to help & thanks for the feedback.

+ 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] Return MAX value based on set criteria
    By Arran [BMI] in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2017, 01:01 PM
  2. Return Max or Min value based on criteria
    By san6279 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2017, 07:37 PM
  3. Return a value based on two criteria
    By statlerhale0 in forum Excel General
    Replies: 9
    Last Post: 11-13-2014, 07:28 PM
  4. Return name based on 2 criteria
    By QUESTIONS123 in forum Excel General
    Replies: 3
    Last Post: 04-10-2012, 11:03 PM
  5. Return 1st, 2nd, 3rd, etc value based on criteria
    By waddsn1060 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-01-2011, 04:28 PM
  6. Return value based off 2 criteria.
    By iamdavid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-11-2010, 05:37 PM
  7. [SOLVED] return value based on two criteria
    By blopreste3180 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2006, 10:20 AM

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