ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   loop count (https://www.excelbanter.com/excel-discussion-misc-queries/47807-loop-count.html)

TUNGANA KURMA RAJU

loop count
 
I posted a question yesterday named"count row numbers in loop".Nobody could
solve my problem.I am posting the same with elaborate logic.
A B c(Total persons D (Total females
(name) (code) working under) working under)

1 JOHN 4/M =2 =1
2 CARY 6/M =0 =0
3 LARA 1/M = 1 =1
4 DAVID 0/M = 7 =2
5 LUCY 6/F =1 =0
6 RAO 4/M =3 = 1
7 JAMES 5/M =0 =0
8 CRIS 3/F =0 =0

Range B1:B8 contains codes of range A1:A8 persons.John's code 4/M indicates
he is a male employee and his immediate boss is row(4) person ,that is
DAVID.Row(4) person(DAVID) has 2 subordinates(John & Rao),whose 3
subordinates are(lara,cary,lucy) and their 2 subordinates are (james and
cris),thus total 7persons are working under DAVID.
What formula will get the above results in C1 and D1?
I don't want to add any more columns to my worksheet to get the desired
results.

Duke Carey

This is a problem that requires recusrion to solve it. It isn't anything
I've done in Excel, but I followed the series of articles here to perform
similar tasks in SQL Server. If you don't have SQL Server, it works just
equally well in MSDE, which is a free, personal version of SQL Server

http://www.windowsitpro.com/SQLServe...123/16123.html


"TUNGANA KURMA RAJU" wrote:

I posted a question yesterday named"count row numbers in loop".Nobody could
solve my problem.I am posting the same with elaborate logic.
A B c(Total persons D (Total females
(name) (code) working under) working under)

1 JOHN 4/M =2 =1
2 CARY 6/M =0 =0
3 LARA 1/M = 1 =1
4 DAVID 0/M = 7 =2
5 LUCY 6/F =1 =0
6 RAO 4/M =3 = 1
7 JAMES 5/M =0 =0
8 CRIS 3/F =0 =0

Range B1:B8 contains codes of range A1:A8 persons.John's code 4/M indicates
he is a male employee and his immediate boss is row(4) person ,that is
DAVID.Row(4) person(DAVID) has 2 subordinates(John & Rao),whose 3
subordinates are(lara,cary,lucy) and their 2 subordinates are (james and
cris),thus total 7persons are working under DAVID.
What formula will get the above results in C1 and D1?
I don't want to add any more columns to my worksheet to get the desired
results.


TUNGANA KURMA RAJU

Hi Duke,
I am just a learner in Excel.I didn't understand the terminology you used in
your answer.After going through the web page your referred in your reply I
dont find any recursion formula there.What is MSDE.

"Duke Carey" wrote:

This is a problem that requires recusrion to solve it. It isn't anything
I've done in Excel, but I followed the series of articles here to perform
similar tasks in SQL Server. If you don't have SQL Server, it works just
equally well in MSDE, which is a free, personal version of SQL Server

http://www.windowsitpro.com/SQLServe...123/16123.html


"TUNGANA KURMA RAJU" wrote:

I posted a question yesterday named"count row numbers in loop".Nobody could
solve my problem.I am posting the same with elaborate logic.
A B c(Total persons D (Total females
(name) (code) working under) working under)

1 JOHN 4/M =2 =1
2 CARY 6/M =0 =0
3 LARA 1/M = 1 =1
4 DAVID 0/M = 7 =2
5 LUCY 6/F =1 =0
6 RAO 4/M =3 = 1
7 JAMES 5/M =0 =0
8 CRIS 3/F =0 =0

Range B1:B8 contains codes of range A1:A8 persons.John's code 4/M indicates
he is a male employee and his immediate boss is row(4) person ,that is
DAVID.Row(4) person(DAVID) has 2 subordinates(John & Rao),whose 3
subordinates are(lara,cary,lucy) and their 2 subordinates are (james and
cris),thus total 7persons are working under DAVID.
What formula will get the above results in C1 and D1?
I don't want to add any more columns to my worksheet to get the desired
results.



All times are GMT +1. The time now is 07:35 PM.

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