+ Reply to Thread
Results 1 to 24 of 24

Extract Data from 12 different sheets into one single column without VBA and PowerQuerry

  1. #1
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Extract Data from 12 different sheets into one single column without VBA and PowerQuerry

    12 sheets as 12 months.
    I want to copy unique values from these 12 sheets. Sheets name is defined as "months" in NAME MANAGER.
    OR how to use {months} name ranges in this formula which is working for only 1 sheet? I don't want to use the same thing 12 times in a single formula that's why i created a 12 sheets and defined it "months" in NAME MANAGER.
    OR if someone can provide another working formula because this method will automatically update the new value inserted in any month without refreshing.

    Note: this file only have 2 sheets as a sample.
    I don't want to use PowerQuerry, PivotTable or VBA.
    I created it and using this database since 2013 and it's very complex so i cannot change it's properties.
    I did not post same problem on any other platform.
    I am using office 2016.

    Thanks
    Attached Files Attached Files
    Last edited by greatinfoteam; 11-10-2022 at 12:57 PM. Reason: Mentioning the office version and some details

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    You have only 2 columns in each tab?
    why don't you gather all data in one tab and divide the columns into months?

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    + do you use excel 365 by chance?
    It can be easily done by UNIQUE + TOCOL functions, but they are only available in MS 365

    =SORT(UNIQUE(TOCOL(FILTER(data!A6:D31,data!A5:D5="Style No."))))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Thanks for urgent view. It is only a sample for focusing only the needs. In actual i have more than 12 columns some times.
    Attachment 804482

  5. #5
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Sorry to mention about office version. i am using Office 2016 and i know Office 365 has this UNIQUE function.

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

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    I'll ask Belinda's question another way.

    Any formula is going to be VERY complicated.

    1. Is one helper column per sheet acceptable? EWven if a helper is acceptable...

    2. By FAR, the simplest solution is to have ONE sheet, with ONE extra column containing the month. Excel allows for more than 16,000 columns per sheet, so you will certainly have space for it.
    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

  7. #7
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Can you please explain a little more or you have the sample sheet attached in my post can you do it so that i can view it properly?

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

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    ??? Confused. Instead of 12 sheets, have ONE with an additional column for month. Look at the January sheet. I have added February in and added in an extra column, for the month. With a big flat slab of data, doing any calculations will be FAR easier. Combining data from different sheets is VERY, VERY messy.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    User defined function with VBA code is another option. It does not require any changes. it can be used like any other function. Are you interested.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  10. #10
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Thanks for reply dear. yes i am interested if it does not require any changes.

  11. #11
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    I understand your way dear Glenn and i am working on it since last year that how to manage all 12 months data on one sheet. Because it's a huge data and process and i cannot change my current file so i am making it for next year 2023 and i am sure i have to take some help regarding this when i will be on it because i know i am not enough expertise in excel. Thank You

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Does a single list of unique values from all 12 sheets is required.

  13. #13
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Yes only a single list for Column "Style No." from 12 sheets. I want this so that the data automatically update in MAIN sheet if any value of Column "Style No." change in any of these 12 sheets without refreshing. Hope if could explain this to you.

  14. #14
    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,025

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Your replies are confusing. I do not know what is acceptable and what is not.

  15. #15
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Here is the macro for creating unique list .

    Please Login or Register  to view this content.
    For the list to be corrected when changes are done in any worksheet Worksheet event is to be used for each sheet.
    Code for worksheet event is
    Please Login or Register  to view this content.
    I have applied for Jan Sheet same is to be repeated for all sheets.
    How to use workheet event the code
    Right click on Sheet tab --> view code
    Visual Basic (VB) window opens.
    Paste the code
    Close the VB window.
    Save the file as .xlsm
    This is one time job.

  16. #16
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    I just read your question deeply again and what i could understand that you are saying 1 extra column for each sheet or you're saying to make these 12 sheets data into one sheet and than an extra month column in this sheet. Sorry i could not understand your concern at first instance. So
    If you are saying that 1 extra column for all these 12 sheets it's okay but
    if you are asking to make 1 single sheet of these 12 months into one place that would not work for me.

  17. #17
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Where is the file???? Or you could'nt uplaod it...

  18. #18
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Okay why i am getting this error which i am attaching a screenshot. What if i remove this option from excel Trust Center options. I mean is this macro harmful or is there any difference to the file by disable or enable this Document Insperctor! option.
    Attached Images Attached Images

  19. #19
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Dear friend as i am not much familiar with excel macros i am having some issues so please review these. I have not only 12 sheets i also have many other sheets in this file and when i run this macro it goes for all those sheets i am it should get data only from these 12 sheets. 2ndly i am unable to adjust columns if i want to to change it for any other file or data? how many tabs do i have and how can i change the column reference in this macro code, i am attaching a screenshots for it. So can you please explain a little bit about modifying this macro and one more thing i am also using another macro of event changing for Highlighting the current selection Row, so can i combine both event into one.
    here is the code for Highlighting the current selection Row:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Target.Calculate
    End Sub

    so how to combine your event code into this.
    You can also take a look how many tabs and data row/columns i am working with them from screenshots.

    thanks for your precious time dear.
    Attached Images Attached Images

  20. #20
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Sorry. Here is the file.
    The macro will not change any data in any sheet. Change the macro security for this file. There is nothing in macro which changes the file.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 11-14-2022 at 10:09 AM.

  21. #21
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Your VBA is very fast and perfect solution for copying unique data thanks and sorry i think i couldn't explain my concern regarding the macro you applied.
    As i sent screenshots of my working excel file there are also some more sheets in my working file after 12 months and sheet Style Detail like Credit Note, Ledger, Invoice etc.
    So the sample file you sent with macro working fine but when i copy that macro into my personal excel file the macro is working but it is also copying data from other sheets after 12 months sheets and for that for your view i also sent the screenshot in Reply #19 where the code also copied some values from other sheets like date and other values.

    2ndly i asked that how can i combine two events into one code because i am already using another event code, for Highlighting the current selected Row.

    I hope if i could explain my difficulty. This is the same concern i asked in Reply #19.
    Thanks
    Last edited by greatinfoteam; 11-15-2022 at 11:14 AM.

  22. #22
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    I have modified the codes
    Macro
    Please Login or Register  to view this content.
    Worksheet event for all Monthly sheets.
    Please Login or Register  to view this content.
    You can combine worksheet event code with other event code. If you have any problem upload the event codes that is already being used.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    03-21-2020
    Location
    Lahore, Pakistan.
    MS-Off Ver
    Microsoft Office 2021
    Posts
    30

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Hello Dear!
    Your VBA is very helpful to me but it is only working in the sample file we used in Forum. If i modify the Range from A5 to B5 in this code it is still getting the values of Range A5 after applying into my persona excel file. Actually i want to ask how can we change the Range which is "A5" in this VBA into any other Range Like B5, C5 or D10 etc. Could you please tell me how to modify the range for getting list of another Range.

  24. #24
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract Data from 12 different sheets into one single column without VBA and PowerQuer

    Pl post a sample file similar to your file.
    In this code A5 is used to know there exists a data in that sheet or not.

+ 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. Extract data into a single column
    By Success4me in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2019, 10:02 AM
  2. Need formula to extract a single digit per column from time data
    By purelutz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-22-2017, 10:29 PM
  3. Merge specific column data from multiple sheets in single column of new workbook.
    By kadam203 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2016, 01:58 AM
  4. Replies: 6
    Last Post: 03-24-2015, 04:13 AM
  5. extract data from 2 sheets to single sheet
    By sumonrezadu in forum Excel General
    Replies: 3
    Last Post: 01-31-2014, 10:26 AM
  6. [SOLVED] If same column in multiple sheets is marked with an X how can i extract surrounding data
    By chrisjames25 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-06-2013, 03:25 PM
  7. Extract data basesd on a unique column to new sheets
    By ahad_bwp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2012, 12:40 AM

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