+ Reply to Thread
Results 1 to 6 of 6

Looking up Data in a relatively blank Sheet

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    seatte
    MS-Off Ver
    Excel 2003
    Posts
    9

    Looking up Data in a relatively blank Sheet

    Hey everyone,


    I'm trying to write a formula that will condense data that's sparse in an otherwise blank data sheet. In a study my research lab did, participants were assigned to 1 of 12 conditions and asked two questions after that. There responses were recorded in a 24 column sheet, with each condition that a participant was assigned, having two entries in the corresponding columns. The result is that for each participant, there are 22 columns with no data, and 2 columns with their answer. I want to find some way to write a formula that condenses it all into the same two columns, but so far I've been unsuccessful. I've included a picture attachment that should show what it looks like. Any help would be really, really appreciated.

    Thanks!
    pete
    Attached Images Attached Images
    Last edited by peteatlab; 06-09-2011 at 04:13 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Looking up Data in a relatively blank Sheet

    Assuming your first row range is M3:AZ3, try these:

    =INDEX(M3:AZ3,MATCH(TRUE,INDEX(M3:AZ3<>"",0),0))

    and

    =INDEX(M3:AZ3,MATCH(TRUE,INDEX(M3:AZ3<>"",0),0)+1)

    next to each other and copied down

    These will extract the first and next items in each row...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    seatte
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Looking up Data in a relatively blank Sheet

    Thanks so much! That certainly worked!

    A follow up question though: How would I modify this so that if all columns within the designated space are blank, the cell i'm programming is left blank? Currently, if that's the case, I'm given N/A. I tried to embed this statement in an IF(ISBLANK( statement, but that didn't work... any thoughts?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Looking up Data in a relatively blank Sheet

    Try:

    =IF(COUNTA(M3:AZ3)=0,"",INDEX(M3:AZ3,MATCH(TRUE,INDEX(M3:AZ3<>"",0),0)))

    and


    =IF(COUNTA(M3:AZ3)=0,"",INDEX(M3:AZ3,MATCH(TRUE,INDEX(M3:AZ3<>"",0),0)+1))

  5. #5
    Registered User
    Join Date
    06-09-2011
    Location
    seatte
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Looking up Data in a relatively blank Sheet

    You sir, are a king among men.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Looking up Data in a relatively blank Sheet

    Umm... Thank you ... and you're welcome.

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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