Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2024, 06:20 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default Query on another tab


Hi all,
Please could you assist in this?
I thought this was going to be an easy solution but to no avail
I have a spreadsheet with multiple tab's
Tab one is the main tab containing all the data
The second Tab is called "AGS"
I want to query the Main tab and search for all records containing "AGS" and display it in the AGS tab
And so forth for the remainder of the other Tab's
Attached is a sample

Please could you possible assist?
Attached Files
File Type: xlsx Stock Formula.xlsx (24.2 KB, 3 views)
Reply With Quote
  #2  
Old 03-21-2024, 08:48 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Query on another tab Windows 10 Query on another tab Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi and welcome
The other tabs are empty and don't even have headers?
Could you please be more complete ?
Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 03-21-2024, 09:15 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

Hi,
Indeed the other tabs are empty without headers
This should be imported by the query from the first tab
Reply With Quote
  #4  
Old 03-21-2024, 11:27 AM
TessaMurillo TessaMurillo is offline Query on another tab Windows Vista Query on another tab Office 2010
Advanced Beginner
 
Join Date: Mar 2024
Posts: 33
TessaMurillo has a little shameless behaviour in the past
Default

For Excel, you can use macros or formulas to perform similar tasks.
In the "AGS" tab, create a formula or macro that will filter the data from the main tab and copy only those records that contain "AGS".
Once the data has been copied, it can be pasted into the appropriate cells in the AGS tab.
Reply With Quote
  #5  
Old 03-21-2024, 11:35 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

Hi,

I do know know how to do this.
Could you possible assist with this in the attached spreadsheet?
Reply With Quote
  #6  
Old 03-21-2024, 11:45 PM
ArviLaanemets ArviLaanemets is offline Query on another tab Windows 8 Query on another tab Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Quote:
Originally Posted by Gismo1233 View Post
I want to query the Main tab and search for all records containing "AGS" and display it in the AGS tab
And so forth for the remainder of the other Tab's
Why do you want to do this?

Do you want to abandon working and easily manageable design with one, where different data groups are on different sheets? Which will be a headache, when you need e.g. some total overview. And you have to redesign your workbook every time some new grouping is applied.

Or you want simply to display data of single data group? Then design a report sheet, where at top of sheet the user can select (using Data Validation List) any data group identificator (e.g. "AGS" for your example) , and in table below all wanted data are displayed from main table. To do this, you either:
a) use an ODBC query in report sheet, with cell where user selected the group identificator as WHERE clause parameter, and which will be refreshed whenever a new data group is selected;
b) have the table on report sheet with formulas, which determine the row in main table to be read into report table row (e.g. by adding hidden columns into main table, where the row number of main table, and the entry number of any identificator you use, are calculated) using e.g. SUMIFS function, and then use INDEX function to get all values from this row in main table into row of report table.

With either of solutions, to display certain group of data, you need only 2 sheets! And whenever you add a new data group to main table, all editing you need is to make this new group to be included into Data Validation List on report sheet!
Reply With Quote
  #7  
Old 03-22-2024, 12:07 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

The data tab's are set, if I do need to add a new group, I will make a new sheet but for now they are set

The reason I want it this way is I only need to update the main sheet and the data will be displayed accordingly on the tab's

I then need to run additional functions from the individual tab's for reporting

I tried the the If Index but think I might not have done it correctly
Reply With Quote
  #8  
Old 03-23-2024, 02:14 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

Hi all,
Any other suggestions please
Reply With Quote
  #9  
Old 03-23-2024, 04:02 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Query on another tab Windows 10 Query on another tab Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Quote:
Originally Posted by Gismo1233 View Post
Hi,
Indeed the other tabs are empty without headers
This should be imported by the query from the first tab
This is not very clear...
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #10  
Old 03-23-2024, 04:19 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

I have my master data in tab 1
Tab 2 is named "AGS"
All the data in the master data tab that equals "AGS" in the first column, must be displayed in the "AGS" tab, Column A - G
Reply With Quote
  #11  
Old 03-23-2024, 08:58 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Query on another tab Windows 10 Query on another tab Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Attached a solution using Power Query ( it's called Get and Transform in 2019 I think).
In this file you can add/delete/modify rows to the main tab and just hit " Refresh" to update the AGS tab.
For the benefit of members unable/unwilling to open the file here is the code
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows" = Table.SelectRows(Source, each ([Type] = "AGS"))
in
    #"Filtered Rows"
Attached Files
File Type: xlsx Stock Formula(1).xlsx (32.1 KB, 1 views)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #12  
Old 03-25-2024, 01:30 AM
Gismo1233 Gismo1233 is offline Query on another tab Windows 10 Query on another tab Office 2019
Novice
Query on another tab
 
Join Date: Mar 2024
Posts: 7
Gismo1233 is on a distinguished road
Default

Thank you so much, I thought this would have been an easier solution but just could not use the standard functions
Much appreciated, not only does it work well, it looks good
Thank you
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need a power query for this one? shabbaranks Excel 5 04-10-2019 03:29 AM
IFS query (I think) ronsar Excel 1 12-06-2018 09:04 AM
Query and Power Query not working Excel 2016 bl10 Excel 0 07-22-2016 06:25 PM
Calendar Query mwh1002 Outlook 0 07-30-2013 08:50 AM
How to Query Text in MS-Excel 2010 or Import Data & Query outside of Excel? mag Excel 0 10-18-2012 11:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft