function help-keeping data from true when false

J

jay d

hey

a function i have counts a list of names if the logical test is true,
but if the logical test is false, how would i get it to keep the result
it had from when it was true?

eg. if the month and year is equal to the current month and year,
perform action, if not, keep the result from the true test.

it is column C that has this function in. at the moment, in the false
test, the function looks at the above cell, i know this is wrong.

i have attached an example doc to explain.

thanks

Jamie


+-------------------------------------------------------------------+
|Filename: Book.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4767 |
+-------------------------------------------------------------------+
 
P

Pete_UK

Many contributors are reluctant to open an unknown file - can you try
to describe your problem more fully here, with a copy of the formula
you are using now?

Pete
 
J

jay d

here is the code


Code:
--------------------
=IF(YEAR(TODAY())=$A$3,IF(MONTH(TODAY())=$B11,COUNTA($A$35:$A$59),0),$C10)
--------------------


a3=year
b11=month in number format
a35:a59=list of names

it can depend on month and year this function.
 
P

Pete_UK

I still don't understand what it is you want to do. If you want the
value_when_true to show even if the condition is false, then you don't
need a condition, so you could just have:

=COUNTA($A$35:$A$59)

I'm not sure if this helps.

Pete
 
J

jay d

unfortunately that does not work. as the list of names changes each
month. so if i did a counta function, the previous months would
change.

eg jan = 6 people
feb = 4 people
mar = 3 people

so when the month and year is current, add the list, if not keep the
total people in the cell from the month when it was true.

does this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top