+ Reply to Thread
Results 1 to 12 of 12

Excel: Pulling Data from one sheet to another if condition met

Hybrid View

  1. #1
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Excel: Pulling Data from one sheet to another if condition met

    I have a project with several sheets. I'm wanting to pull data from one sheet into another if criteria is met. I think I'm close but not sure why it keeps returning blank values.
    I put the following formula into sheet #4 and referenced the first sheet by name(Party_Treasure). The data I want to search against is in column H starting on row 9 and down. If column H has the value "Party", I want to pull the data from that sheet in Column A, Row 9 and copy it into my sheet 4 where the formula resides.

    Example. On sheet Party_Treasure, Row H9 contains the word Party. I want to return the value in that row, column A, and put it into my other sheet. I'd then like it to continue searching for subsequent listings for "Party" without leaving blank lines on sheet #4

    =IFERROR(INDEX(Party_Treasure!H:H,SMALL(IF(Party_Treasure!$H$9:$H$500="Party",ROW(Party_Treasure!$A$9:$A$500)),ROW()-ROW(H$9)+1)),"")

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel: Pulling Data from one sheet to another if condition met

    What is the address of the first cell that the formula is entered into?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,173

    Re: Excel: Pulling Data from one sheet to another if condition met

    Try

    =IFERROR(INDEX(Party_Treasure!$H$9:$H$500,SMALL(IF(Party_Treasure!$H$9:$H$500="Party",ROW(Party_Treasure!$H$9:$H$500)-ROW(Party_Treasure!$H$9)+1,""),ROWS($A9:A9))),"")



    Enter with Ctrl+Shift+Enter

    Copy down

  4. #4
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel: Pulling Data from one sheet to another if condition met

    John,
    That pulls column H instead of A with is what I need. Thanks though. Getting closer lol.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,173

    Re: Excel: Pulling Data from one sheet to another if condition met

    then ..

    =IFERROR(INDEX(Party_Treasure!$A$9:$A$500,SMALL(IF(Party_Treasure!$H$9:$H$500="Party",ROW(Party_Treasure!$H$9:$H$500)-ROW(Party_Treasure!$H$9)+1,""),ROWS($A9:A9))),"")

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel: Pulling Data from one sheet to another if condition met

    Quote Originally Posted by JohnTopley View Post
    =IFERROR(INDEX(Party_Treasure!$A$9:$A$500,SMALL(IF(Party_Treasure!$H$9:$H$500="Party",ROW(Party_Treasure!$H$9:$H$500)-ROW(Party_Treasure!$H$9)+1,""),ROWS($A9:A9))),"")
    Like this...

    =IFERROR(INDEX(Party_Treasure!B:B,SMALL(IF(Party_Treasure!H$9:H$500="Party",ROW(Party_Treasure!H$9:H$500)),ROWS(A$9:A9))),"")

  7. #7
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel: Pulling Data from one sheet to another if condition met

    Back to blank values now

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel: Pulling Data from one sheet to another if condition met

    Quote Originally Posted by ukman408 View Post
    Back to blank values now
    I think I had the wrong column:

    =IFERROR(INDEX(Party_Treasure!B:B,SMALL(IF(Party_Treasure!H$9:H$500="Party",ROW(Party_Treasure!H$9:H$500)),ROWS(A$9:A9))),"")
    You want the data to come from column A, right?

    Then this version:

    =IFERROR(INDEX(Party_Treasure!A:A,SMALL(IF(Party_Treasure!H$9:H$500="Party",ROW(Party_Treasure!H$9:H$500)),ROWS(A$9:A9))),"")

    Still array entered.

  9. #9
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel: Pulling Data from one sheet to another if condition met

    Ok. Thats pulling the value for the first entry. I tried copying it down on sheet4 but it repeats the first value over and over. Hmmm

  10. #10
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel: Pulling Data from one sheet to another if condition met

    If it helps, here's the sheet. basically I wanna pull the values from sheet Party_Treasure to keep a list of items each person has "claimed" on Claimed_Loot sheet
    https://docs.google.com/spreadsheets...gid=1939789185

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,173

    Re: Excel: Pulling Data from one sheet to another if condition met

    As Tony spotted ..

    =IFERROR(INDEX(Party_Treasure!$A$9:$A$500,SMALL(IF(Party_Treasure!$H$9:$H$500="Party",ROW(Party_Treasure!$H$9:$H$500)-ROW(Party_Treasure!$H$9)+1,""),ROWS($A$9:A9))),"")

  12. #12
    Registered User
    Join Date
    08-14-2015
    Location
    Tallahassee, FL
    MS-Off Ver
    2010
    Posts
    6

    Re: Excel: Pulling Data from one sheet to another if condition met

    Thank you! That did it!!!!!!!!!!!

+ 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] pulling the data as per condition
    By arindamsenaxa in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-03-2015, 02:48 AM
  2. Problem with pulling data to my userform from Excel sheet
    By Roampie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-07-2015, 10:14 AM
  3. Replies: 16
    Last Post: 04-22-2013, 03:00 PM
  4. [SOLVED] Need An Excel Macro for Pulling in Data from one sheet to Another
    By chiru7963 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2012, 09:11 AM
  5. Pulling data from one sheet to another in excel
    By SallyW-EDUK in forum Excel General
    Replies: 5
    Last Post: 11-01-2012, 11:46 AM
  6. Replies: 2
    Last Post: 11-23-2011, 03:45 AM

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