+ Reply to Thread
Results 1 to 3 of 3

Extract Values from a Table Cell Using Ranges

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Somewhere, Canada
    MS-Off Ver
    2010
    Posts
    2

    Extract Values from a Table Cell Using Ranges

    Hello everyone,

    I'm trying to extract data from a certain cell in a table, but instead of using exact values for one of the table's axes, I only have age and ID ranges.

    excel.jpg

    In this table, I need to get a value from a cell based on an age range (listed in column B) and an ID range (listed in row 4). So, if a user is 27 and has an identifier of 7, I need to be able to get a result of 2.3 back. Only problem is I can only get this to work if I specify the headings in exact values, i.e. I can only get a result if I say "26-30" and "6-7." The user needs to specify their exact age, not a range. But if they do, my spreadsheet won't be able to find the proper info because, obviously, "27" doesn't equal "26-30." Nor does "7" equal "6-7." Is there a way that I can get my spreadsheet to look at the data in column B and row 4 as ranges instead of exact values?

    I've done a Google search on this problem and have found that there is a way to do this using left() and right() formulas, but I can't follow the logic on the pages I read this from. And when I just regurgitate (which isn't the best way to learn) the formulas, I get an error.

    Can anyone help?

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Extract Values from a Table Cell Using Ranges

    I went with SUMPRODUCT, though LOOKUP might work with some nested expressions as well.

    Please Login or Register  to view this content.
    I had my Identifier in H4 and Age in H5.


    This formula takes each column and row header, substitutes each dash for 10 spaces, and evaluates it.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Somewhere, Canada
    MS-Off Ver
    2010
    Posts
    2

    Re: Extract Values from a Table Cell Using Ranges

    Whoa.

    Not being in Excel for too long, that expression looks crazy. Ok. Uhm...so I guess the substitute() function takes all dashes from the identifier ranges as replaces it with 10 spaces, like you said. So "3-5" becomes "3 5". What do the left() and right() functions do with those substitutions?

    Where does H4 come into this? Is that where I put my identifier value?

    I broke it down like this:
    Please Login or Register  to view this content.
    I guess it's taking everything as one array? I'm a little confused.

+ 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] Extract unique values from a table and list along a row
    By doctorblyth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-05-2013, 04:33 PM
  2. Extract values from table based on 2 criterias
    By plamenbv in forum Excel General
    Replies: 0
    Last Post: 09-19-2013, 05:09 AM
  3. extract number values from a table and make a list
    By mischge in forum Excel General
    Replies: 27
    Last Post: 08-14-2013, 04:00 AM
  4. [SOLVED] Wanting to extract specific data from a table of values
    By lvsmr2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-04-2013, 02:24 AM
  5. Extract Data Between Cell Ranges
    By billmar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2005, 09:00 PM

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