+ Reply to Thread
Results 1 to 7 of 7

Pulling specific lines from a list based on a cell value

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    Manchester, England
    MS-Off Ver
    MS 365
    Posts
    57

    Pulling specific lines from a list based on a cell value

    Dear All,
    I'm trying to create a report that splits out data based on values in a specific column in the main data list.
    I have one sheet in my workbook which has multiple rows of data relating to POS Card Terminal Receipts. There are 2 Terminals, each with their own ID, and the rows have a 'Terminal ID' column that I wish to use to create data on 2 additional sheets - 1 for each Terminal.
    I need to be able to interrogate the main data sheet and automatically create rows in each on the new sheets based on the value in the 'Terminal ID' column.
    So on the sheet for Terminal 1, it should look down the data - checking the 'Terminal ID' column for the value '1' and then, for each case of when it finds it, create a new row on the Sheet for Terminal 1.
    The scenario is then further complicated by the fact that I then want have Sub-Totals on each of the new sheets.
    Any help gratefully received.
    Thanks in advance.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,970

    Re: Pulling specific lines from a list based on a cell value

    Sounds like a job for FILTER, unless you want the new sheets generated, in which case maybe PowerQuery.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-12-2012
    Location
    Manchester, England
    MS-Off Ver
    MS 365
    Posts
    57

    Re: Pulling specific lines from a list based on a cell value

    Thanks Ali,
    the sheets will already be set up but i want the addition of data to be dynamic. Every few days I download a new 'csv' file with new transactions in it. I then simply copy and paste the new ones into the data sheet on the spreadsheet. At present I'm going through a process of filtering by Terminal ID and then copying and pasting the data into each sheet. This is a little bit long winded but manageable however, the plan is to add more terminals over time which will start becoming a huge pain.
    I would like to be able to just paste over the entire data cells with the new ones and have each Terminal sheet auto update without having the faff of 'filtering, copying and pasting' the data for each Terminal separately.
    In the attached sample I have removed the "Sub-Totalling" on the Terminal sheets to ease the process but I would need to be able to turn it back on at the end.
    I did consider recording a Macro to go through the process of "Filtering, Copying and Pasting" but I'm sure there must be a better way.Terminal ID Sample.xlsx

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,970

    Re: Pulling specific lines from a list based on a cell value

    I think you'll need VBA for this - shall I move the thread for you?

  5. #5
    Registered User
    Join Date
    03-12-2012
    Location
    Manchester, England
    MS-Off Ver
    MS 365
    Posts
    57

    Re: Pulling specific lines from a list based on a cell value

    Hi Ali
    If you mean a Macro then I can probably manage that myself.
    Thanks for your help.

  6. #6
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,505

    Re: Pulling specific lines from a list based on a cell value

    here your macro

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,970

    Re: Pulling specific lines from a list based on a cell value

    Yes, indeed macros are created using VBA.

+ 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 a Unique list of People who worked a specific day
    By oneblondebrow in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-12-2023, 10:27 AM
  2. Pulling the value of a specific cell based the date that I click
    By coleestro in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2013, 12:38 PM
  3. Pulling the value of a specific cell based the date that I click
    By coleestro in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-15-2013, 02:56 PM
  4. Pulling a Specific Cell when Pulling a Tabel from Web Based Data
    By Zallen89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2013, 05:39 PM
  5. Pulling data lines based on criteria - VBA
    By jamesh777 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 05:06 AM
  6. Replies: 1
    Last Post: 08-06-2012, 12:14 PM
  7. Replies: 3
    Last Post: 09-22-2008, 11:36 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