+ Reply to Thread
Results 1 to 8 of 8

How to return specific column values in a separate sheet

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    How to return specific column values in a separate sheet

    Hi,

    Good Day! I've been wondering if there is a way in excel that can return specific value on a separate sheet.

    Attached is my sample spreadsheet for easier reference, as you can see in Sheet 2, this is how my raw file looks like whenever I generate my report and paste it here.

    Under Sheet 1, I need to summarize certain details such as the Job no, Name and Address.

    As I want to auto populate the details in Sheet 1 as I paste the raw files in Sheet 2, I need a formula in sheet 1 cell C1 and cell E1.

    For cell C1 - I need a formula that will capture all the job numbers under sheet 2 and will return it in Sheet 1 same way as how it looks now, consecutively and with no row spaces in between.

    Note: The job numbers is not limited to five values only, it changed from time to time. Sometimes a have a list of 10 or more and the first cell with job number doesn't always fall on cell A25.

    For cell E1 - If only the address is within the same row as the job number I know I can just use a vlook up formula, but since it falls under the client name, is there a way i can have it reference in my Sheet 1 too in a way that is aligned with cell C1 and D1?

    I hope my explanation makes sense.

    Thank you to anyone who would take the time to help me on this. God Bless.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to return specific column values in a separate sheet

    IF your format for your raw data is always the same as your sample, this formula will pull the Job No...
    =IF(ROWS($9:9)>COUNT(Sheet2!$A:$A),"",INDEX(Sheet2!$A:$A,19+6*ROWS($A$1:A1)))

    This assumes that...
    1. your data starts on row 25 - if not, adjust the ,19 part accordingly (19+6=25)
    2. Your job numbers are actually real numbers, and not text (and not numbers that look like text)

    To get the rest of the data, adjust the bolded part to match the column you want
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to return specific column values in a separate sheet

    Hi so the +6 is the indicator of the next value the formula is supposed to pull right? can't we like just changed the criteria in a way that the formula instead reads and only returns the NUMBER values? I tried it in my actual file but sometimes the spaces in between is not just 6, sometimes the job number value falls in the 5th or 7th line in between and so the formula is returning a text value instead such as, "Active", "Normal"

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to return specific column values in a separate sheet

    If you are willing to use a helper column, we can do that

  5. #5
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to return specific column values in a separate sheet

    Sure. A helper column can do.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,806

    Re: How to return specific column values in a separate sheet

    I think we can do it without a helper column. In C9:

    =IFERROR(INDEX(Sheet2!A:A,SMALL(IF(ISNUMBER(Sheet2!$A$25:$A$52),ROW(Sheet2!$A$25:$A$52)),ROWS($A$1:A1))),"")

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Then you just need to lookup the corresponding data. In D9:

    =INDEX(Sheet2!$B$25:$B$52,MATCH(Sheet1!C9,Sheet2!$A$25:$A$52,0))

    and in E9:

    =INDEX(OFFSET(Sheet2!$B$25:$B$52,1,),MATCH(Sheet1!C9,Sheet2!$A$25:$A$52,0))
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to return specific column values in a separate sheet

    Wow, this works perfectly! Thank you so much Ali for taking the time to respond on my query. God Bless!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,806

    Re: How to return specific column values in a separate sheet

    You're welcome!

+ 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] Sum values in specific column for items found in two separate lists
    By Groovicles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2016, 01:45 PM
  2. Replies: 4
    Last Post: 10-01-2015, 11:01 AM
  3. Replies: 1
    Last Post: 11-17-2014, 09:59 AM
  4. Need to select data based on conditions in a separate sheet then return the values
    By scottmcclean in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2014, 03:39 PM
  5. [SOLVED] How To Split Excel File Into Separate Workbooks Based on Values In a Specific Column
    By UzieJacuzzi in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-31-2012, 07:26 AM
  6. Replies: 0
    Last Post: 08-15-2011, 03:17 PM
  7. Replies: 6
    Last Post: 02-25-2009, 04:52 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