+ Reply to Thread
Results 1 to 7 of 7

Check for values in a table and if found add value found in column to left to list

  1. #1
    Registered User
    Join Date
    07-23-2005
    Posts
    46

    Check for values in a table and if found add value found in column to left to list

    Hi

    I have a table of validated list drop downs, there are four for people to choose from and all are days of the week so they choose their options.

    So for example I would like to be able to list all the people who chose Monday as an option. The table is C8:G25 and C is the column with the persons names and D, E, F and G are columns with the days of the week option drop downs. Im also interested to know if possible to list all the people who have not picked a day.

    Ive attached a mock up spreadsheet with the output im looking for hard text in

    I really appreciate your help with this and hope its possible.

    Thanks Rob
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Check for values in a table and if found add value found in column to left to list

    Hello Rob
    Does the table in the attached reply do as you require? The formulas could be reversed for people Not choosing those days.

    Hope this helps.
    DBY
    Attached Files Attached Files

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check for values in a table and if found add value found in column to left to list

    1 way is using this ARRAY formula in I5 and copy down and across.

    =IFERROR(INDEX($B$3:$B$20,SMALL(IF($C$3:$F$20=LEFT($H5,3),ROW($B$3:$B$20)-2),COLUMN(A$1))),"")

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    07-23-2005
    Posts
    46

    Re: Check for values in a table and if found add value found in column to left to list

    Thanks this is great,

    DBS can you tell me which bit of the formula would I need to change to get a list of the people who haven't chosen.

    Fotis the array looks like a useful formula - could you help break down the array formula into simple terms based on my question so I can understand how to use and adapt this too

    Cheers

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check for values in a table and if found add value found in column to left to list

    Hi Rob.

    Fotis the array looks like a useful formula - could you help break down the array formula into simple terms based on my question so I can understand how to use and adapt this too
    I'll try!(Practicing my English)


    =IFERROR(INDEX($B$3:$B$20,SMALL(IF($C$3:$F$20=LEFT($H5,3),ROW($B$3:$B$20)-2),COLUMN(A$1))),"")

    So the Index part of the formula(INDEX($B$3:$B$20..) shows the range that we'll get the names that we need..

    The Small(if part of the formula(SMALL(IF($C$3:$F$20=LEFT($H5,3) ), gives the range(C3:F20),that formula has to check for our condition which is(LEFT($H5,3) )Which in simple words says: " See which cells in range C3:F20, compare with the 3 first letters of H5 cell."

    The Row part of the formula(ROW($B$3:$B$20)-2) ) just say to the formula the first row that have to start the search..In your case as your Names start in row 3 we use -2 at the end of the formula. If your Names were started in row 20..then we should use -19 at the end of the formula.

    And finally the Column part of the formula(COLUMN(A$1) )show the first result and as you drag across this will be done B1(for the second Name) C1...D1....and so on..

    The IFERROR, is for getting empty cells where there is nothing as result..
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Red face Re: Check for values in a table and if found add value found in column to left to list

    Hello Rob
    I apologise, it's not just a case of reversing the formulas as I thought, didn't think it through. The only way I can think of at the moment to bring back the negatives for each day is to use a separate count table. In the attached reply I've done that and created a few Named ranges for ease of reference. You could use Fotis's Array formulas with this table if you wish, it's a matter of preference if you're happy to use them.

    Perahps Fotis or another forum member might have a solution for returning the negative days without a helper table.

    Regards
    DBY
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-23-2005
    Posts
    46

    Re: Check for values in a table and if found add value found in column to left to list

    Thanks guys this is really really useful, the array formulas are very powerful. DBY thanks for your solution, although ive learnt something especially new from Fotis I will use your suggestion on with the lookup to get the neg days.
    Best regards,,,
    Rob

+ 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] Finding “NULL” values and shifting specific cell rows to the left when found.
    By dotsofcolor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-22-2012, 10:17 AM
  2. [SOLVED] Check for three values and return other value if found
    By akalien in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-06-2012, 07:54 AM
  3. Check for duplicate, then if found check for any changes in a different column?
    By brenweb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2012, 07:39 AM
  4. Check for data in cell. If found paste text into same row another column
    By Buddy7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2011, 02:38 PM
  5. Check if cell value is found in a seperate range of values
    By wilby31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2005, 08:05 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