Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2015, 02:57 PM
rindelsk rindelsk is offline IF formula using dates Windows 7 64bit IF formula using dates Office 2010 64bit
Novice
IF formula using dates
 
Join Date: Apr 2015
Posts: 1
rindelsk is on a distinguished road
Default IF formula using dates

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.
Reply With Quote
  #2  
Old 04-06-2015, 01:15 AM
skywriter skywriter is offline IF formula using dates Windows 7 32bit IF formula using dates Office 2010 32bit
Novice
 
Join Date: Apr 2015
Posts: 5
skywriter is on a distinguished road
Default

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula using dates IF Formula to calculate dates Sophie1 Excel 2 04-23-2014 07:19 AM
IF formula using dates Changing Actual Finish dates changes original Finish dates SomewhereinTX Project 3 12-20-2013 10:25 AM
IF formula using dates Automating dates OCM Outlook 4 04-03-2013 08:29 PM
If formula for subtracting dates gbaker Excel 6 10-07-2012 07:06 AM
IF formula using dates Calculating dates Daria11 Word VBA 1 06-08-2011 06:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft