+ Reply to Thread
Results 1 to 3 of 3

Need help with making Excel choose from variables

  1. #1
    Registered User
    Join Date
    03-13-2022
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    1

    Need help with making Excel choose from variables

    I have these variables which is X meters and then the price change as you go up in meters and cross section
    If the price is between 500-1500meters i cost 3.36 for a cross section 40cm^2
    If the price is 3000 meters it cost 2.85 meters for a cross section 40cm


    So i would like to make a code that automatically chooses the price if it's a 40mm cross-section and 499m e.g.

    I attached an Excel with the variables

    Anyone with ideas!
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Need help with making Excel choose from variables

    One way, of many:

    =LOOKUP(2,1/($C$4:$C$7<D13),INDEX($D$4:$I$7,,MATCH(B10,$D$3:$I$3,0)))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    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,178

    Re: Need help with making Excel choose from variables

    Another

    =INDEX($D$4:$I$7,MATCH($D$13,$C$4:$C$13,1),MATCH($B$10,$D$3:$I$3,1))*$D$13
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Help! Making excel choose the right calcualtion
    By Markmake12 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-08-2018, 05:09 PM
  2. making auto table for item i choose
    By Tefa Tato in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-24-2016, 03:27 PM
  3. [SOLVED] Need help in making code for macro buttons to choose filter
    By Aladoran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2013, 02:57 AM
  4. Excel 2007 : Making a graph using two extreme variables
    By rgupta0747 in forum Excel General
    Replies: 0
    Last Post: 01-09-2012, 01:47 PM
  5. Making a Suffix from Variables
    By Cakin in forum Excel General
    Replies: 6
    Last Post: 11-30-2010, 05:23 PM
  6. Using USERFORM to collect variables and choose appropriate macro
    By ExcelVBAHelp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2010, 12:22 AM
  7. Making excel remember a pattern based on variables
    By MattG in forum Excel General
    Replies: 5
    Last Post: 11-07-2008, 04:52 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