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

5995 posts

Uber Geek
+1 received by user: 910

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


573 posts

Ultimate Geek
+1 received by user: 72

  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
888 posts

Ultimate Geek
+1 received by user: 172


  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..


5995 posts

Uber Geek
+1 received by user: 910

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.

1218 posts

Uber Geek
+1 received by user: 511

  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.

1428 posts

Uber Geek
+1 received by user: 311

  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.

928 posts

Ultimate Geek
+1 received by user: 218


  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;
=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

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.

5995 posts

Uber Geek
+1 received by user: 910

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!

2134 posts

Uber Geek
+1 received by user: 1029

  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 »

New Zealand's IT industry in 2018 and beyond
Posted 22-Jan-2018 12:50

Introducing your new workplace headache: Gen Z
Posted 22-Jan-2018 12:45

Jucy set to introduce electric campervan fleet
Posted 22-Jan-2018 12:41

Hawaiki cable system will be ready for service in June 2018
Posted 22-Jan-2018 12:32

New Zealand hits peak broadband data
Posted 18-Jan-2018 12:21

Amazon Echo devices coming to New Zealand early February 2018
Posted 18-Jan-2018 10:53

$3.74 million for new electric vehicles in New Zealand
Posted 17-Jan-2018 11:27

Nova 2i: Value, not excitement from Huawei
Posted 17-Jan-2018 09:02

Less news in Facebook News Feed revamp
Posted 15-Jan-2018 13:15

Australian Government contract awarded to Datacom Connect
Posted 11-Jan-2018 08:37

Why New Zealand needs a chief technology officer
Posted 6-Jan-2018 13:59

Amazon release Silk Browser and Firefox for Fire TV
Posted 21-Dec-2017 13:42

New Chief Technology Officer role created
Posted 19-Dec-2017 22:18

All I want for Christmas is a new EV
Posted 19-Dec-2017 19:54

How clever is this: AI will create 2.3 million jobs by 2020
Posted 19-Dec-2017 19:52

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.