![]() |
#1
|
|||
|
|||
![]()
I am trying to make a spreadsheet to keep track of stats for a homeless shelter. The stat time period is not from beginning of the month to the end of the month, so it changes it stat period. One of the columns I need to is to keep track of how many were admitted during that stat period and how many were discharged during that stat period. I have the starting date for the stat period in cell C1. Column B has each clients intake date. Column C has each clients outtake date. Column G has the total number in each family that entered the shelter. Column Q is how many admitted during that stat period. Column R is how many discharged during that period. I want to create a formula that will be able to automatically enter the number of family members admitted or discharged based on the dates they came in and left. Here is what I tried:
=IF(B14>C1,"=G14",0)+IF(B14=C1,"=G14",0) I want it to be able to read the intake date and if it is equal to or greater than the starting date of the stat period, to input the total number of family members into the cell (in this case G14). However I get a #VALUE! error. Please help me...this is driving me nuts! I think part of the problem is the formatting of the cell with the dates...but I'm not sure. Cells in Columns B & C are formatted as dates, 4/05/2015. |
#2
|
|||
|
|||
![]()
If your formula is exactly as you wrote it.
=IF(B14>C1,"=G14",0)+IF(B14=C1,"=G14",0) then your problem is "=G14", you don't use quotes and you don't use the = sign. It should be written as so. =IF(B14>C1,G14,0)+IF(B14=C1,G14,0) To explain this formula just to confirm that it's set to do what you want. If B14 is greater than C1, you get the value in G14, otherwise you get 0. The second part, if B14 = C1, it will return the value in G14, otherwise 0. You are adding these two together, but since it can't be greater than and equal to at the same time I think your formula would be better to look like this. =IF(B14>=C1,G14,0) This say if it's greater than OR equal to give me the value in G14, otherwise return 0. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Sophie1 | Excel | 2 | 04-23-2014 07:19 AM |
![]() |
SomewhereinTX | Project | 3 | 12-20-2013 10:25 AM |
![]() |
OCM | Outlook | 4 | 04-03-2013 08:29 PM |
If formula for subtracting dates | gbaker | Excel | 6 | 10-07-2012 07:06 AM |
![]() |
Daria11 | Word VBA | 1 | 06-08-2011 06:54 PM |