+ Reply to Thread
Results 1 to 12 of 12

Pull row from Mastersheet into another worksheet based on a cell value

  1. #1
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Red face Pull row from Mastersheet into another worksheet based on a cell value

    Hello, I have two worksheets.

    Mastersheet
    Subsheet

    What I want to do, is update the Mastersheet and use a formula (not Macro) to extract the whole row into a subsheet, if in that row it contains a particular Cell value.

    e.g. In the example below, If column C contains '2' I want to pull that whole row in the same order into the subsheet.

    Mastersheet
    A B C D
    Cats|Dogs|Fish|Crab
    3 2 2 3
    5 5 3 3
    7 3 2 3

    Subsheet
    A B C D
    Cats|Dogs|Fish|Crab
    3 2 2 3
    7 3 2 3

    Is there a formula I can use at all?

    Thank you for your help.

  2. #2
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Try

    in Master Sheet

    in A2

    =IFERROR(INDEX(Sheet1!$A$2:$D$4,SMALL(IF(Sheet1!$C$2:$C$4=2,ROW(Sheet1!$A$2:$A$4)-ROW($A$2)+1,""),ROWS($A$2:A2)),COLUMN()),"")

    Sheet1 is your sub-sheet

    Enter with Ctrl+Shift+Enter

    Copy acroos and down

  3. #3
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Hello,

    Thats awesome thank you, it does exactly what I want there's only one thing, when I copy the formula down and across it doesn't work to pick up the next row that will have a '2' in the fish column. Am I doing something wrong or not changing something I should?

    Thank you for your help

  4. #4
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Was it entered with Ctrl+Shift+Enter? You will see curly brackets { ....} appear round the formula if this is done correctly.

    And are the ranges correct?
    Last edited by JohnTopley; 09-22-2016 at 07:35 AM.

  5. #5
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Hello, thank you so much, that was the issue, one last question, when I apply this formula from my excel 2010 to an older excel 2003 it doesn't work. How can I use this formula in Excel 2003?

  6. #6
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    You need to replace IFERROR with ISERROR construct

    Try

    =IF(ISERROR(INDEX(Sheet1!$A$2:$D$4,SMALL(IF(Sheet1!$C$2:$C$4=2,ROW(Sheet1!$A$2:$A$4)-ROW($A$2)+1,""),ROWS($A$2:A2)),COLUMN())),"",INDEX(Sheet1!$A$2:$D$4,SMALL(IF(Sheet1!$C$2:$C$4=2,ROW(Sheet1!$A$2:$A$4)-ROW($A$2)+1,""),ROWS($A$2:A2)),COLUMN()))

  7. #7
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Thank you so much, if I wanted to replace the 2 with the word Fish (instead of a number) would that make a difference

  8. #8
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    It should work with "Fish"

  9. #9
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Thank you, it works with the "" marks around the word which is great, the only thing now is that when I put the ctrl, shift and enter it turns the cell to #NA the formula also is not copying down. Im not sure what I did wrong

  10. #10
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Please post a sample file.

    To Attach a File:

    1. Click "Go Advanced"
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  11. #11
    Registered User
    Join Date
    09-21-2016
    Location
    london, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Hi, my comp with 2003 doesn't have internet, its to do with the A cells, they don't change, I have to change each cell manually

  12. #12
    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
    30,781

    Re: Pull row from Mastersheet into another worksheet based on a cell value

    Without a file it isn't possible to help resolve the problem.

+ 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] VBA to pull data from worksheet to a new sheet based on specific text cell value
    By TalResha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2013, 02:11 AM
  2. [SOLVED] macro to create new sheets based on a column value in the mastersheet
    By workexcelinfo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 11:46 PM
  3. Pull data from worksheet based upon date
    By pyrofenix in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2013, 12:55 PM
  4. [SOLVED] copy a row of info to another worksheet based on a pull down menu
    By jrlafrance in forum Excel General
    Replies: 6
    Last Post: 08-02-2012, 09:23 PM
  5. [SOLVED] Worksheets (1 x worksheet in 5 different workbooks) combined into one 'mastersheet'
    By Nat Barnes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-18-2012, 09:57 AM
  6. Macro to pull cellls based on text into another worksheet
    By Greed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2012, 06:48 AM
  7. Combine and update three worksheet into one mastersheet
    By sheclaire in forum Excel General
    Replies: 4
    Last Post: 04-05-2007, 12:11 PM
  8. Transfer data from mastersheet to various worksheet
    By Mandeep Dhami in forum Excel General
    Replies: 1
    Last Post: 05-05-2006, 05:10 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