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

5869 posts

Uber Geek
+1 received by user: 848


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


547 posts

Ultimate Geek
+1 received by user: 65

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

Ultimate Geek
+1 received by user: 158


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


5869 posts

Uber Geek
+1 received by user: 848


  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.

1422 posts

Uber Geek
+1 received by user: 307

  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.

907 posts

Ultimate Geek
+1 received by user: 210


  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.

5869 posts

Uber Geek
+1 received by user: 848


  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!

2085 posts

Uber Geek
+1 received by user: 999

  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 »

UFB killer app: Speed
Posted 17-Nov-2017 17:01

The case for RSS — MacSparky
Posted 13-Nov-2017 14:35

WordPress and Indieweb: Take control of your online presence — 6:30 GridAKL Nov 30
Posted 11-Nov-2017 13:43

Chorus reveals technology upgrade for schools, students
Posted 10-Nov-2017 10:28

Vodafone says Internet of Things (IoT) crucial for digital transformation
Posted 10-Nov-2017 10:06

Police and Facebook launch AMBER Alerts system in NZ
Posted 9-Nov-2017 10:49

Amazon debuts Fire TV Stick Basic Edition in over 100 new countries
Posted 8-Nov-2017 05:34

Vodafone VoIP transition to start this month
Posted 7-Nov-2017 12:33

Spark enhances IoT network capability
Posted 7-Nov-2017 11:33

Vocus NZ sale and broadband competition
Posted 6-Nov-2017 14:36

Hawaiki reaches key milestone in landmark deep-sea fibre project
Posted 4-Nov-2017 13:53

Countdown launches new proximity online shopping app
Posted 4-Nov-2017 13:50

Nokia 3310 to be available through Spark New Zealand
Posted 4-Nov-2017 13:31

Nest launches in New Zealand
Posted 4-Nov-2017 12:31

Active wholesale as Chorus tackles wireless challenge
Posted 3-Nov-2017 10:55

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.