Formula help for hep b spreadsheet, pls

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Formula help for hep b spreadsheet, pls

Post by mishmish3000 »

Good afternoon, all!
Here's a play version of the spreadsheet I'm developing for the auto-numbered perinatal (baby) hepatitis B workbooks mentioned in other posts. I've got the autonumbering working well. What I need some guidance on are the formulas on the CalcF sheet. These will allow the running totals for various questions; the questions make up a report we send to the CDC in Atlanta once a year.
I listed how to calculate the answers, what the answers should be, and then have a space where I can put in the formulas to do the calculations. I just need help with them, since (a) it's calculating from another sheet--I know I can use the ! sign after the sheet name, followed by the cell reference, though and (b) some of the calculations are going to involve some IF statements, I do believe. Any help would be greatly appreciated. It's in Excel 2007.
Thanks
MishMish :thankyou:
You do not have the required permissions to view the files attached to this post.
Anne

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Formula help for hep b spreadsheet, pls

Post by HansV »

Some of the counts involve the age of the baby. Is this the current age (using TODAY() as reference point), or the age at a fixed date, or...?
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Formula help for hep b spreadsheet, pls

Post by mishmish3000 »

baby's age in months at dose3 date
On the CalcF sheet, I made notes on what the calculated fields should be based on...
so for example, baby1 who was born on 1/1/2011 would have an age of 7 months... it's based on the date of the dose3 date. baby1's dose3 date was 8/11/2011.
Does that make sense? Hope so!
Thanks!! :thankyou:
Anne

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Formula help for hep b spreadsheet, pls

Post by HansV »

We'll calculate the age of the baby in column AN. In AN2: =IF(X2="","",DATEDIF(P2,X2,"m")) and fill down.

B2: =COUNT(Mom_Baby!P2:P1501)
B3: =COUNTA(Mom_Baby!AK2:AK1500)
B4: =COUNTIFS(Mom_Baby!U2:U8,"<>",Mom_Baby!W2:W8,"<>",Mom_Baby!X2:X8,"<>",Mom_Baby!AN2:AN8,"<=8")
B5: =COUNTIFS(Mom_Baby!U2:U8,"<>",Mom_Baby!W2:W8,"<>",Mom_Baby!X2:X8,"<>",Mom_Baby!AN2:AN8,"<=12")
I don't understand why you have 0 in B5 - this number CANNOT be smaller than B4!
B6: =COUNTIF(Mom_Baby!Z2:Z8,"<>")
B7: =COUNTIFS(Mom_Baby!AA2:AA8,"Pos",Mom_Baby!AG2:AG8,"Pos")
B8: =COUNTIF(Mom_Baby!AK2:AK8,"Lost to follow-up")
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Formula help for hep b spreadsheet, pls

Post by mishmish3000 »

Um, I have 0 in B5 because there are no 12 month olds in the WTR data set. Maybe I should leave it blank?
I'll try the code out tomorrow... looks super!
Thanks * infinity!
MishMish :grin:
Anne

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Formula help for hep b spreadsheet, pls

Post by HansV »

But your description says "count of cases where dose1, 2, and 3 not null and age 12 mo or less by birth year"...
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Formula help for hep b spreadsheet, pls

Post by mishmish3000 »

:sad:
My bad...answer should be same as answer above it... I just got carried away with "no 12 month olds". Been a long day.
Thanks! adios until tomorrrow!
MishMish :thankyou:
Anne