+ Reply to Thread
Results 1 to 9 of 9

Extracting Values to new tab

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Extracting Values to new tab

    Hi,

    I have a list like below

    S.No Fruit Color Weight
    1 Apple red 10
    2 Orange orange 20
    3 Apple red 15
    4 Banana yellow 10
    5 Peach green 16
    6 Apple red 25

    Now, I need a list linked into another tab which extracts all apple and orange entries along with their weight. How to do this?

    Thanks!

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

    Re: Extracting Values to new tab

    Use this array formula:
    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$B$2:$B$7={"Orange","Apple"},ROW(Sheet1!$B$2:$B$7)),ROWS(A$2:A2))),"")

    in sheet2, A2, copied across and down.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    See sheet.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-13-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Extracting Values to new tab

    Thanks a lot Glenn. Can I have a tab where a list is fetched based on certain matching conditions. For example, in your sheet column D is parameter 4. If I add another column with parameter 5, and in that column, there are entries like "good", "bad", etc., can I fetch entries into another tab based on "good"?

    1 Apple red 10 good
    2 Orange orange 20 bad
    3 Apple red 15 good
    4 Banana yellow 10 good
    5 Peach green 16 good
    6 Apple red 25 bad

    Can I have the same solution based on the last filter?

  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 2403
    Posts
    44,098

    Re: Extracting Values to new tab

    Yes. You just need to nest another IF statement:

    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$B$2:$B$7={"Orange","Apple"},IF(Sheet1!$E$2:$E$7="Good",ROW(Sheet1!$B$2:$B$7))),ROWS(A$2:A2))),"")
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-13-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Extracting Values to new tab

    Thank you so much Glenn.

    But each time I am hitting "Ctrl+shift+enter", it popus up to enter a filename, and then a tab name. What do do?

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Extracting Values to new tab

    Or you can do this with a helper column

    F2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Sheet 2

    A2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Check the attached file.
    Attached Files Attached Files
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

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

    Re: Extracting Values to new tab

    You need to check that you have copied the sheetnames correctly in your real data. The most likely cause is... if you have spaces in your sheet names:

    for example: 2017 - 2018 then you need to use '2017 - 2018' to enable Excel to pick up the corretc sheet.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-13-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Extracting Values to new tab

    @Glenn - Thank you so much. It worked. Reps added

    @Ankur - Will check your solution as well. Reps added

  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 2403
    Posts
    44,098

    Re: Extracting Values to new tab

    You're welcome and thanks for the rep.

+ 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] Extracting Values
    By yuenk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-26-2017, 11:55 AM
  2. Extracting values from a PDF
    By FDibbins in forum Excel General
    Replies: 10
    Last Post: 09-25-2013, 02:22 AM
  3. [SOLVED] Need help with extracting values
    By zarealshook in forum Excel General
    Replies: 3
    Last Post: 12-12-2012, 05:56 AM
  4. Extracting values
    By john27 in forum Excel General
    Replies: 3
    Last Post: 09-24-2012, 05:49 AM
  5. [SOLVED] Extracting Innertext Values of TD
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-22-2012, 02:52 AM
  6. Extracting values from A1, A11, A21
    By allstarbiotech in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-29-2011, 08:53 PM
  7. Extracting values (?)
    By beedee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2007, 11:03 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