+ Reply to Thread
Results 1 to 11 of 11

Formula to check column and return multiple values

  1. #1
    Registered User
    Join Date
    07-09-2019
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    6

    Formula to check column and return multiple values

    Hello everyone,

    I want to make an excel formula that checks if a column doesn't contain a blank cell if it doesn't it needs to return a value from that specific row if it doesn't it needs to move on to the next so that every number is neatly in sequence and no blank spaces are present anymore.
    This could be done by copying the columns pasting them as values and then use a sort, but I want to have the proces automated for future users of the excel worksheet.

    This is my currnet formula:
    {=IFERROR(INDEX($E$8:$E$12;SMALL(IF(""<>$F$8:$F$12;MATCH(ROW($F$8:$F$12);ROW($F$8:$F$12));"");ROWS($N$1:N1)));"")}

    It is checking the F column for empty cells and if it doesn't encounter them selecting the row numbers returns the value of that row in column E it also needs to do this for F and G.

    I have two problems with the formula as of now:
    1. It works well when retrieving cells from column E and G but doesn't in F. (SOLVED)
    2. It now specifically checks for a certain array length but, I need it to do this for the entire E,F and G column no matter the length since this will deviate in the future (all columns start at row 8 in the current sheet)

    I have worked with excel a fair bit but, I am no expert whatsoever. So if you have an answer to my problems it would be very much appreciated if you could explain the answer.

    Thank you all for your time!
    Attached Files Attached Files
    Last edited by DutchieAMC; 07-09-2019 at 09:01 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,762

    Re: Formula to check column and return multiple values

    Welcome to the forum.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-09-2019
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to check column and return multiple values

    Thank you AliGW for kindly showing me what the general practice is of the site, of course I should have read the stickies a bit better first.

    I also thought the formula would be simple to fix for someone with a great knowledge of excel so did not think about adding my worksheet.

    If everything went well the file is now attached to my first message.

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

    Re: Formula to check column and return multiple values

    Maybe this in M2, copied across and down:

    =IFERROR(INDEX(E:E,AGGREGATE(15,6,ROW($F$8:$F$200)/($F$8:$F$200<>""),ROWS(M$7:M7))),"")

    It's an ordinary formula, but you may need ; not , as the separator.
    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

  5. #5
    Registered User
    Join Date
    07-09-2019
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to check column and return multiple values

    This formula works exactly like I want it to, thank you so much!

    I have now written it as:
    =IFERROR(INDEX(E:E;AGGREGATE(15;6;ROW($F$8:INDIRECT(CONCATENATE("F";$H$8)))/($F$8:INDIRECT(CONCATENATE("F";$H$8))<>"");ROWS(I$14:I15)));"")
    With H8 counting how many rows with relevant data there are.

    I now have one last problem that I hope you can help me with: I want to put this formula in a different sheet and reference the cells of the first sheet so that the "clean" data shows up in the second sheet.
    I have tried many times now but keep getting #value errors and the like.

    Either way thanks for the formula!

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

    Re: Formula to check column and return multiple values

    Sure, but to avoid ambiguity, can you repost a samples sheet in a new reply to this thread (not an edit of Post 1)? That way, I'll get an email when yo make the change.

  7. #7
    Registered User
    Join Date
    07-09-2019
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to check column and return multiple values

    Yes, will do!
    Attached Files Attached Files

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

    Re: Formula to check column and return multiple values

    No.... I wouldn'd to it like that at all. There's no reason why you can't simply use ranges that are "future proof"

    =IFERROR(INDEX('data processing'!E:E,AGGREGATE(15,6,ROW('data processing'!$F$8:$F$100)/('data processing'!$F$8:$F$100<>""),ROWS(A$1:A1))),"")

    copied across and down will do exactly what you want. AGGREGATE is perfectly hapy with the range inclusing blank rows, as you're selcting only the non blanks with the bit in red. INDIRECT is not needed at all. It's best avoided , whenever possible, as it's volatile, recalculating every time anything changes on the sheet. That can cause big performance issues.
    Attached Files Attached Files

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

    Re: Formula to check column and return multiple values

    However, if you do want to use INDIRECT, for some unexplained reason:

    =IFERROR(INDEX('data processing'!E:E,AGGREGATE(15,6,ROW(INDIRECT("'data processing'!F8:F"&'data processing'!$H$8))/(INDIRECT("'data processing'!F8:F"&'data processing'!$H$8)<>""),ROWS(E$1:E1))),"")

    copied across and down... but I wouldn't...
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-09-2019
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    6

    Re: Formula to check column and return multiple values

    Quote Originally Posted by Glenn Kennedy View Post
    No.... I wouldn'd to it like that at all.
    I will take your advise and avoid the volatile function, I was just worried about the difference in rows of data between different experiments.

    Thanks for the help and advise! I really do appreciate it.
    Last edited by AliGW; 07-12-2019 at 03:58 AM. Reason: Please don't quote unnecessarily!

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

    Re: Formula to check column and return multiple values

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Check for multiple vlookup return values
    By mgblair in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2015, 06:03 PM
  2. check the value of a cell in a range and return column values of that row
    By green369 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2015, 07:11 AM
  3. check multiple cells for values and return another value
    By amazzei in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-07-2014, 01:50 PM
  4. Replies: 5
    Last Post: 08-04-2013, 09:49 AM
  5. [SOLVED] COUNTIF Formula to Return Multiple Values in a Single Column
    By TommyK25 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2013, 05:01 AM
  6. VLOOKUP or INDEX formula to return multiple values in the same column
    By Raidon in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-08-2012, 08:41 AM
  7. [SOLVED] Formula (VLOOKUP vs INDEX & MATCH) to return multiple values in the same column
    By wfidler in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2012, 07:04 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