Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


6220 posts

Uber Geek
+1 received by user: 1037

Trusted
Lifetime subscriber

Topic # 187926 10-Dec-2015 08:47
Send private message

Morning all,

I have an Excel spreadsheet containing data on physical sites (about 4000 rows), each with a unique ID. I also have a second table (in the same file) from our GIS system which lists the IDs of sites within a certain geographic area (this has about 1000 rows).

What I want to do is filter the main table so that it only shows the 1000 rows that I'm interested in. I've played around with the advanced filters but can't figure out how to get this working. I've also tried conditional formatting with no luck.

How can I accomplish this? Are any more details required?

Thanks :)

Create new topic

k14

579 posts

Ultimate Geek
+1 received by user: 75


  Reply # 1446939 10-Dec-2015 09:30
One person supports this post
Send private message

Might need a bit more info but from what you describe it sounds like using a pivot table might be the best option. Look on youtube for some tutorials on how to use them.

What does this tag do
955 posts

Ultimate Geek
+1 received by user: 194

Subscriber

  Reply # 1446944 10-Dec-2015 09:34
Send private message

Yeah would recommend a pivot table, are you wanting to edit the data or is this for viewing it?
If for viewing you could try out something like Qlik Sense Desktop (free) and explore data with that.

Actually k14 if OP does want to edit, can you edit data via a Pivot Table or is it just read only?
If needing to edit may just have to use the row header filters..



6220 posts

Uber Geek
+1 received by user: 1037

Trusted
Lifetime subscriber

  Reply # 1446946 10-Dec-2015 09:34
Send private message

Aha! The thought did cross my mind but I didn't know how they worked and didn't want to waste time learning them if it wasn't the right tool. Thanks for the pointer; it looks like some reading is in order :)

282 posts

Ultimate Geek
+1 received by user: 76


  Reply # 1446950 10-Dec-2015 09:41
2 people support this post
Send private message

An alternative way to do this would be vlookups. While a pivot table is probably the right tool for this instance, they are handy to know about so you could go and look into those as well if you are so inclined.

1236 posts

Uber Geek
+1 received by user: 523


  Reply # 1447014 10-Dec-2015 10:49
Send private message

I don't know if I'll explain this very well, but...

A basic way to do it would be to add a column to the 4000 row table with a formula in it something like =IF(COUNTIF(xx$a:xx$b,yya)<>0,1,0) where xx$a:xx$b is the column range in the 1000 row table that contains the site IDS and yya is the cell in the current row of the 4000 row table that has the site ID.  This will put a 1 in the cell if the site ID on that row is in the 1000 row table and a 0 if it's not. You can then filter that column to display only rows that contain a 1.

1595 posts

Uber Geek
+1 received by user: 372


  Reply # 1447023 10-Dec-2015 11:09
Send private message

+1 for andrew027's suggestion because Filtering only works with one range of data. A separate range of data, whether in the same or a different worksheet. requires a formula to create a "join" between the two sets of data.

The one change I would make is to use the vlookup function to return the value you are matching with. That way you can confirm that the ID of the record matches the ID returned by vlookup. You can do this visually by returning the result of the vlookup or you could use an if function to compare the returned value with the ID of the current record/row.

953 posts

Ultimate Geek
+1 received by user: 222

Trusted
Subscriber

  Reply # 1447046 10-Dec-2015 11:38
Send private message

I tend to use a combination of INDEX and MATCH functions.  Bit more complex but I find the results more reliable and powerful than a vLookup.  Here is an email I sent to a colleague on their use;
Description
=INDEX (Column I want a return value from in the other worksheet,(MATCH(My Lookup Value on the current row,Column I want to Lookup against on the other worksheet,0 ),1) Example
=INDEX('Sheet2'!B:B,MATCH('Sheet1'!A2,'Sheet2'!A:A,0),1)

Create a new column on the main worksheet and perform the above on the GIS worksheet.  You will end up with a column that either has a value or '#N/A' where you can then filter out the rows with '#N/A'.

PM me the file if you like or send a subset of obfuscated data if it's confidential - two lines on the main worksheet and one on the GIS worksheet would be enough to show you how it works.




Procrastination eventually pays off.




6220 posts

Uber Geek
+1 received by user: 1037

Trusted
Lifetime subscriber

  Reply # 1447051 10-Dec-2015 11:47
Send private message

Whoa, I do some work for a while and get back to a wall of text :P

No further responses required: On the boss' instruction I told someone else to make a PivotTable and all sorted :)

Thanks for the suggestions though!

2368 posts

Uber Geek
+1 received by user: 1144


  Reply # 1447057 10-Dec-2015 11:50
Send private message

Do it the other way round from Andrew's suggestion.

Start with the 1000-row table and columns to use VLOOKUP() to extract the data you want from the 4000-row table.


Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Hawaiki Transpacific cable ready-for-service
Posted 20-Jul-2018 11:29


Microsoft Dynamics 365 Business Central launches
Posted 10-Jul-2018 10:40


Spark completes first milestone in voice platform upgrade
Posted 10-Jul-2018 09:36


Microsoft ices heated developers
Posted 6-Jul-2018 20:16


PB Technologies charged for its extended warranties and warned for bait advertising
Posted 3-Jul-2018 15:45


Almost 20,000 people claim credits from Spark
Posted 29-Jun-2018 10:40


Cove sells NZ's first insurance policy via chatbot
Posted 25-Jun-2018 10:04


N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.