ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   certain rows from a lot of data (https://www.excelbanter.com/excel-discussion-misc-queries/245227-certain-rows-lot-data.html)

ozzyed

certain rows from a lot of data
 
I'm doing an assignment on executive payments and need to organise my data
set. currently i have a column for executive ID's (execid), companies for
which they work (GVKEY) and in what year (YEAR). I need to somehow organise
it so that only executive that have worked for at least 3 years for the same
company are showen in a new table and that this table includes all the years
they have worked for that company (including the first 2).
there is also other columns
If anybody could help it would be much appreciated. the data list is about
30,000 rows long so can't really do it manually.

Cheers

Max

certain rows from a lot of data
 
Assuming execid and GVKEY data running in A2:B2 down
In say, D2:
=IF(COUNTA(A2:B2)<2,"",SUMPRODUCT((A$2:A$30000=A2) *(B$2:B$30000=B2))=3)
Adapt the ranges to suit your actual data extents. Copy D2 down all the way.
Freeze col D with an "in-place" copy n paste special as values. Autofilter
col D, choose TRUE. Copy the filtered results (that's what you seek), paste
on another sheet for your downstreams. Any good? hit the YES below.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"ozzyed" wrote:
I'm doing an assignment on executive payments and need to organise my data
set. currently i have a column for executive ID's (execid), companies for
which they work (GVKEY) and in what year (YEAR). I need to somehow organise
it so that only executive that have worked for at least 3 years for the same
company are shown in a new table and that this table includes all the years
they have worked for that company (including the first 2).
there is also other columns
If anybody could help it would be much appreciated. the data list is about
30,000 rows long so can't really do it manually.

Cheers



All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com