Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Counting and Comparing

Need some help counting and comparing. I have a file that contains a parent
id, child id, and child status. I would like to find out all of the parent
ids with the children of a particular status. Below are a couple scenerios...

1) parent A has 5 children and their status is all "IP" post on worksheet 2.
2) parent B has 5 children and 2 are "IP" and 3 are "NP" then do nothing.

Any help in how to do this?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Counting and Comparing

Something like this should work:

ColA
a
b
c

ColB
1
2
3
4
5
6
7
8
9

Cell E1 is c

Cell F1 is
=IF(ROWS(B$1:B1)<=COUNTIF($A$1:$A$20,$E$1),INDEX($ B$1:$B$20,SMALL(IF($A$1:$A$20=$E$1,ROW($A$1:$A$20)-ROW($E$1)+1),ROWS(B$1:B1))),"")
The function is entered with Ctrl+Shift+Enter (not just enter)

HTH,
Ryan---



--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Pablo" wrote:

Need some help counting and comparing. I have a file that contains a parent
id, child id, and child status. I would like to find out all of the parent
ids with the children of a particular status. Below are a couple scenerios...

1) parent A has 5 children and their status is all "IP" post on worksheet 2.
2) parent B has 5 children and 2 are "IP" and 3 are "NP" then do nothing.

Any help in how to do this?

Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Counting and Comparing

Hi Ryan,

Not sure I am following this... Below is what I am thinking

Parent Id Child Id Status
123 ABC IP
123 DEF IP
123 GHI IP
** All children are good, list parent on worksheet 2

456 JKL IP
456 MNO NP
456 PQR IP
456 STU IP
** at least one child is not IP, do nothing

"ryguy7272" wrote:

Something like this should work:

ColA
a
b
c

ColB
1
2
3
4
5
6
7
8
9

Cell E1 is c

Cell F1 is
=IF(ROWS(B$1:B1)<=COUNTIF($A$1:$A$20,$E$1),INDEX($ B$1:$B$20,SMALL(IF($A$1:$A$20=$E$1,ROW($A$1:$A$20)-ROW($E$1)+1),ROWS(B$1:B1))),"")
The function is entered with Ctrl+Shift+Enter (not just enter)

HTH,
Ryan---



--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Pablo" wrote:

Need some help counting and comparing. I have a file that contains a parent
id, child id, and child status. I would like to find out all of the parent
ids with the children of a particular status. Below are a couple scenerios...

1) parent A has 5 children and their status is all "IP" post on worksheet 2.
2) parent B has 5 children and 2 are "IP" and 3 are "NP" then do nothing.

Any help in how to do this?

Thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing, counting, if, sum... help... LisaM Excel Worksheet Functions 3 September 3rd 09 07:22 AM
Comparing & Counting Data Walt Excel Programming 0 January 28th 09 04:43 PM
Comparing & Counting Data Walt Excel Programming 0 January 28th 09 04:33 PM
Comparing & Counting Data Walt Excel Worksheet Functions 3 January 26th 09 06:23 AM
Comparing Columns and Counting Mike Excel Discussion (Misc queries) 5 January 31st 05 04:55 PM


All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"