Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nydia
 
Posts: n/a
Default Sorry, this is a repost, cuz i didn't explain myself right

Sorry, my initial said only count the "P", but i know need=20
it to count all the codes.
-----Original Message-----
I put
=3DCOUNTIF(D9:H9, "p")
and it works, but the row may have several different=20
codes, so i need it to be able to count whether its p or=20

a=20
or h

=3Dcountif(d9:h9,"p", "a") doesnt work
-----Original Message-----
Try with

=3DCOUNTIF(TheRange, "p")

where TheRange is a reference to the range that contains=20

the p's and h's.

--=20
Regards

Juan Pablo Gonz=E1lez

"NYDIA" wrote in=20

message
...
i have a spreadsheet that is used for a monthly
attendance. There are codes (p=3Dpresent, h=3Dhospital=20

stay
etc). I want to create a formula that will count all=20

the
p's

example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 =20

TOTAL
john smith p p p p p p h h p p p h h h p p p p =20

10

so john was in the program on 10 days of the 5

can you help me with the formula? Any help is greatly
appreciated




  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

=COUNTA(D9:H9)

Regards,

Peo Sjoblom

"nydia" wrote:

Sorry, my initial said only count the "P", but i know need
it to count all the codes.
-----Original Message-----
I put
=COUNTIF(D9:H9, "p")
and it works, but the row may have several different
codes, so i need it to be able to count whether its p or

a
or h

=countif(d9:h9,"p", "a") doesnt work
-----Original Message-----
Try with

=COUNTIF(TheRange, "p")

where TheRange is a reference to the range that contains

the p's and h's.

--
Regards

Juan Pablo González

"NYDIA" wrote in

message
...
i have a spreadsheet that is used for a monthly
attendance. There are codes (p=present, h=hospital

stay
etc). I want to create a formula that will count all

the
p's

example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

TOTAL
john smith p p p p p p h h p p p h h h p p p p

10

so john was in the program on 10 days of the 5

can you help me with the formula? Any help is greatly
appreciated




  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

=3DSUM(COUNTIF(D9:H9,{"p","a"}))

HTH
Jason
Atlanta, GA

-----Original Message-----
Sorry, my initial said only count the "P", but i know=20

need=20
it to count all the codes.
-----Original Message-----
I put
=3DCOUNTIF(D9:H9, "p")
and it works, but the row may have several different=20
codes, so i need it to be able to count whether its p=20

or=20
a=20
or h

=3Dcountif(d9:h9,"p", "a") doesnt work
-----Original Message-----
Try with

=3DCOUNTIF(TheRange, "p")

where TheRange is a reference to the range that=20

contains=20
the p's and h's.

--=20
Regards

Juan Pablo Gonz=E1lez

"NYDIA" wrote in=20

message
.. .
i have a spreadsheet that is used for a monthly
attendance. There are codes (p=3Dpresent, h=3Dhospital=20

stay
etc). I want to create a formula that will count=20

all=20
the
p's

example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 =20

TOTAL
john smith p p p p p p h h p p p h h h p p p=20

p =20
10

so john was in the program on 10 days of the 5

can you help me with the formula? Any help is greatly
appreciated



.

  #4   Report Post  
nydia
 
Posts: n/a
Default

It worked :) :) Thank You so much and Thanks to the other=20
guy who helped in the previous post. his suggestion did=20
work, but i didn't explain correctly. :) Thanks Again :)
-----Original Message-----
=3DSUM(COUNTIF(D9:H9,{"p","a"}))

HTH
Jason
Atlanta, GA

-----Original Message-----
Sorry, my initial said only count the "P", but i know=20

need=20
it to count all the codes.
-----Original Message-----
I put
=3DCOUNTIF(D9:H9, "p")
and it works, but the row may have several different=20
codes, so i need it to be able to count whether its p=20

or=20
a=20
or h

=3Dcountif(d9:h9,"p", "a") doesnt work
-----Original Message-----
Try with

=3DCOUNTIF(TheRange, "p")

where TheRange is a reference to the range that=20

contains=20
the p's and h's.

--=20
Regards

Juan Pablo Gonz=E1lez

"NYDIA" wrote in=20
message
. ..
i have a spreadsheet that is used for a monthly
attendance. There are codes (p=3Dpresent, h=3Dhospital=20

stay
etc). I want to create a formula that will count=20

all=20
the
p's

example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 =20
TOTAL
john smith p p p p p p h h p p p h h h p p p=20

p =20
10

so john was in the program on 10 days of the 5

can you help me with the formula? Any help is greatly
appreciated



.

.

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
Excel help should explain how to change r1c1 to a1 schlimgen Excel Discussion (Misc queries) 2 January 27th 05 02:10 AM
Repost -calculate % change for each phrase. Gwen Excel Worksheet Functions 0 January 3rd 05 05:47 PM


All times are GMT +1. The time now is 12:41 AM.

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

About Us

"It's about Microsoft Excel"