Forum

Need to add another...
 
Notifications
Clear all

Need to add another column to existing query, from a different sheet.

6 Posts
2 Users
0 Reactions
66 Views
(@paulma)
Posts: 17
Eminent Member
Topic starter
 

Hi, I've created a query that extracts data from a specific sheet in a folder and it's working fine. Now, I need to add another column to the table that is returned, and get the value is in a specific cell (G4) of a different sheet in the same files in the folder. Any pointers are most appreciated. TIA, Paul

 
Posted : 21/01/2022 2:40 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Paul,

Create a new query to get the data from cell G4, then add a column to the original query =#"New Query Name"

Mynda

 
Posted : 21/01/2022 8:00 pm
(@paulma)
Posts: 17
Eminent Member
Topic starter
 

Thanks, Mynda, that's working fine. At present, the second query is created by removing the other rows and columns (leaving the single cell G4); is there a better way? Cheers, Paul

 
Posted : 22/01/2022 5:18 am
(@paulma)
Posts: 17
Eminent Member
Topic starter
 

What do I need to do so that the new query doesn't load to another worksheet? 

And I'm unable to download the data, I'm getting an error msg: [Expression Error] The key didn't match any rows in the table. Any suggestions appreciated...

 
Posted : 22/01/2022 6:05 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Paul,

Not sure there's a better way to isolate cell G4 that what you've probably already done.

When you 'close and load' choose Connection Only if you don't want it to load a table to the worksheet. If it's already loaded, right-click the query in the queries and connection pane > Load settings - here you can edit the load settings to connection only.

The Expression Error is caused when you have a hard keyed name (sheet, table, column) in the query that is no longer in the source data the query connects to. i.e. it's looking for a specific name and it can't find it.

Mynda

 
Posted : 22/01/2022 6:49 pm
(@paulma)
Posts: 17
Eminent Member
Topic starter
 

Thanks, Mynda. It's sorted.

 
Posted : 25/01/2022 5:44 am
Share: