+ Reply to Thread
Results 1 to 32 of 32

IF function to return a number value based on various text options

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    IF function to return a number value based on various text options

    Hi

    I have two columns in a spreadsheet that I want to use an IF function with. In the first column, I want a pick list containing 5 text options. Depending on which option is chosen, I want a number to auto-populate in the second column.

    The numbers are important, because I want to repeat this pair of cells with slightly different text values in the second pair, and then to have a column that multiplies the two resulting numbers and conditional formats the result.

    I'm ok with conditional formatting but am a novice with IF functions, so I'd really welcome any help.

    Thanks.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: IF function to return a number value based on various text options

    Pl upload a sample file with examples.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    so are you looking for something like this?
    Attached Files Attached Files
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    not sure if the attachment came through or not, it shows in advanced view but not in regular so will repost.

    EDIT: of course now that it shows in the second post, it now shows in my first.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Here's roughly what I'm working with...
    Attached Files Attached Files

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    so rereading your first post then looking at your upload, you need to be more clear about what columns you are working with and what outputs you are expecting.

  7. #7
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Ok - well, I want a drop-down of options as per the text fields in columns A and C. Then, when you select one of these text drop-downs, I want the corresponding numbers in columns B and D to auto-populate.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    so is this something like you are looking for?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Thank you - yes, something very like that. Is there any way of lining the drop-downs up so they appear where columns A and C are now?

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    like this?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Sambo kid - you're a superstar. Thank you so much.

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    You're welcome! I'll tell my boss so maybe she'll give me a raise.
    Since you're new to the forum some house keeping requests, if that takes care of your issue don't forget to mark your post as solved using the thread tools at the top of the post.

    AND a big thank you for the bump to my reputation.

  13. #13
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    One more question - I want to be able to replicate this for about the first 30 rows of the spreadsheet, but can't seem to work out how to do that. Any tips?

  14. #14
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    going to upload your attachment with some explanations in a few minutes, working on it now.

  15. #15
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    See if this helps you understand the steps involved.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Hi - thank you again. I can't seem to find the developer tab though...

  17. #17
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    click on the help function and type developer into the search, it may not be activated for you but we're both using excel 2010 and it should be available to you.

    This is what comes up for me under help...
    1.Click the File tab.
    2.Click Options.
    3.Click Customize Ribbon.
    4.Under Customize the Ribbon and under Main Tabs, select the Developer check box.

  18. #18
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    I've managed to copy and paste the individual drop downs, and have found the format control bit.

    The trouble now is that I don't understand what to enter. Basically, when I select a different option from the drop down in one of the drop downs, it changes it in the other drop downs too, so they are all the same. I want each row to behave seperately, if that makes sense.

  19. #19
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    can you upload what you're doing so I can try to see what is happening? (remove confidential/sensitive info first).

  20. #20
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Thanks - here you go.

    There are a few things I'm trying to do:

    1. When I select from one of the drop-downs, I want the others to stay the same as they were. Instead, they all change to be the same as each other.

    2. I want the scores to correspond to whichever drop-down items are selected

    3. I'd also now like there to be the option of a blank in each drop-down, so basically it will only produce a score if a drop-down field is selected - otherwise it would stay blank.


    Thanks again Sambo Kid - you've already been so helpful.
    Attached Files Attached Files

  21. #21
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    did you want 28 dropdowns in column A and 28 in column C?
    Since they each are based on one set of data, either C55:C59 or F55:F59 they will all be identical.
    The process I gave you works well for one set of selections, not necessarily for multiples. You are linking each box to the same set of selections (either C55:C59 or F55:F59) so no matter which box is selected it will change all the other "linked" dropdowns. So if you really want 28 "different" dropdowns for selections, based on what I gave you you will need to do 28 versions of either C55:C59 or F55:F59. So basically for each selection box to be independent of the other, you would need to have its own criteria.
    I thought when you wrote that you had like 30 rows you just wanted to extend the selections box to accommodate 30 selections instead of the 5 in the example.
    Hope that makes sense.
    Maybe something along the lines of an if then statement would be better though that would take more of an understanding of what you want to accomplish.

  22. #22
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    My fault for not explaining it very clearly - but yes, basically I want them all to be "different" and unique, but using the same criteria.

    I really like the look of what you have done, so I think although it might take a little time, I will do multiple versions of the fields, and maybe bury them at the bottom of the spreadsheet.

    I'll give that a try - but it sounds like it might work - thanks.

  23. #23
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    I'm totally stuck now. I've tried replicating it 28 times but the drop downs disappeared altogether when I did that. I've tried putting them all on a seperate sheet and now can't get the formulas to work. I think this is just too complicated for me. I can't get my head around what needs to be done.

    Thanks for trying anyway. I think I may have to reluctantly give up and accept it's not possible.

  24. #24
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    give me a couple minutes and I'll give yours back with the 28 versions of each if that is what you want.

  25. #25
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    That would be incredibly helpful - thank you so much. I wish there was a way I could add to your reputation more than once!

  26. #26
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    Ok, here it is with all disconnected and at the bottom of the sheet.
    Attached Files Attached Files

  27. #27
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    You are a complete wizard. I can't begin to thank you for this.

  28. #28
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Sorry - just one more thing. Any idea how to get the numbers in columns B and D to change according to the selections in the drop-down cells? That's the one thing I now just can't get to work. Otherwise it is superb.

  29. #29
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    What do you want the numbers to be?
    this?
    1 Almost Impossible
    2 Low
    3 Significant
    4 High
    5 Very High
    so almost impossible is also 1 and low is 2 etc (same set for "impact")?

  30. #30
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    Yes - that's right - the numbers are correct on the mini-tables you've put at the bottom of the sheet - but on rows 2 and below, when you change the drop down, it doesn't affect the numbers in the neighbouring cells (on both the impact and probability sections). It works like clockwork on the first row though - just not the ones below.

  31. #31
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: IF function to return a number value based on various text options

    Ok, here it is back again with references to the numbers that corresponded to the dropdown selections. if you click on any of the cells you can see what I linked to.
    Attached Files Attached Files

  32. #32
    Registered User
    Join Date
    02-27-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: IF function to return a number value based on various text options

    You have helped not just me but the many people who will be using this spreadsheet in my organisation. Thank you so, 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] Function to match text and return number in adjacent cell?
    By danoswalt in forum Excel General
    Replies: 6
    Last Post: 12-16-2014, 01:47 PM
  2. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  3. Replies: 3
    Last Post: 10-24-2012, 07:11 AM
  4. Replies: 0
    Last Post: 10-11-2012, 03:55 AM
  5. Replies: 21
    Last Post: 08-13-2012, 01: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