+ Reply to Thread
Results 1 to 7 of 7

Display Hole Size Based on Number of Wires

  1. #1
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Display Hole Size Based on Number of Wires

    I'm wanting to display a size in cell M24, such as 3/8", based on the number value in cell L24.

    So say cell L24 <=2, then M24 = 3/8"

    I know I could use a If Statement but I have 5 sizes to choose from, and may add more, which would make a cumbersome If formula.

    I was hoping there may be a way to add them like a database or similar, where they can be called from, maybe from a separate column.

    These are the conditions:

    L24 <=5 then M24 = 1/2"
    L24 <=7 then M24 = 9/16"
    L24 <=12 then M24 = 3/4"
    L24 <=19 then M24 = 1"

    Is the If Statement my only option in Excel for doing something like this?

  2. #2
    Forum Contributor
    Join Date
    04-15-2013
    Location
    Singapore, Melbourne
    MS-Off Ver
    Office 365
    Posts
    167

    Re: Display Hole Size Based on Number of Wires

    M24 formula
    =LOOKUP(L24,{0,2,5,7,12}+0.01,{"3/8","1/2","9/16","3/4","1"}&"""")
    Row row row your boat
    Gently down the stream

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Display Hole Size Based on Number of Wires

    Dear Modify_inc
    please check attached file with four formulas that can be used as solution for your inquiry
    one is If function
    Please Login or Register  to view this content.
    another is Chosen function
    Please Login or Register  to view this content.
    and also you use LOOKUP
    Please Login or Register  to view this content.
    and VLOOKUP

  4. #4
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Display Hole Size Based on Number of Wires

    Thank you for all the suggestions! I will experiment with each and hopefully learn more about them in the process.

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Display Hole Size Based on Number of Wires

    If this solution is okay for you, will be thankful if you mark thread as solved from menu

  6. #6
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    214

    Re: Display Hole Size Based on Number of Wires

    Quote Originally Posted by mazan2010 View Post
    Dear Modify_inc
    please check attached file with four formulas that can be used as solution for your inquiry
    one is If function
    Please Login or Register  to view this content.
    another is Chosen function
    Please Login or Register  to view this content.
    and also you use LOOKUP
    Please Login or Register  to view this content.
    and VLOOKUP
    Thanks for providing different ways to accomplish this. I'm still trying to figure out how your Lookup function is working. Even after reading more about the Lookup function I still can't make sense of how you did it.

    Note a big deal, but the Vlookup doesn't work ideally, since a non-exact match will cause the Vlookup function to match the nearest value in the table that is still LESS than value. And in my case, I need the nearest value that is MORE than the value. So if there are 6 wires, it should display 9/16", instead it still shows 1/2".

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Display Hole Size Based on Number of Wires

    Regarding LOOKUP formula how it works
    in attached example

    In column A (cell A2:A5) contain Smaller Value and Column B (cell B2:B5) is Larger

    In cell G1 is the given value which you want to get its corresponding value, C2:C5 is the column data which you want to extract from.

    I used Inch in formula as range name you see from formula in toolbar then name manager or you can replace Inch in formula with range ($C$2:$C$5)

    As match value meaning True and NON-Match meaning False
    True =1
    false =0
    so in attached example you will see 1 is divided by array that will give #N/A in case now any match

+ 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. Golf Scoreboard // Hole-by-hole GROSS score adjusted to NET
    By eastmo18 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2019, 01:52 PM
  2. Display a number based on infomation in another cell
    By davidstokes in forum Excel General
    Replies: 3
    Last Post: 01-30-2018, 08:15 AM
  3. Display 1 or 0 Based on the time a number shows up.
    By JTR616 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-19-2017, 02:06 PM
  4. Image display on cell based on number value (MAC)
    By jc83ph in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-02-2014, 05:37 AM
  5. determine number of batches based on product type and job size
    By sc11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2012, 07:04 AM
  6. Complete Text to Display Based on Number
    By BlastRanger in forum Excel General
    Replies: 2
    Last Post: 09-30-2010, 04:39 AM
  7. Replies: 3
    Last Post: 07-08-2009, 07:05 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