AND, IF, and SUM IF Functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a simple code for a time log file in excel. on
sheet1("time log") i have four columns (headers are Date, Client, Time,
Staffer). on sheet2 ("totals"), column A has a list of all of the clients and
columns B through M have the months of the year.
i would like for people to be able to enter in all of the info into sheet1
and then for sheet2 to automatically total the hours according to the right
client and under the right month in which the services were performed.
I have tried the following formula but it doesn't seem to work properly:
=IF((MONTH(C$2)=(MONTH('Time Entry'!$A:$A))),SUMIF('Time
Entry'!$B:$C,$A15,'Time Entry'!$C:$C),)

can someone help me with this??
 
=SUMPRODUCT(--(MONTH('Time Entry'!$A$2:$A$500)=MONTH(C$2)),--('Time
Entry'!$B$2:$B$500=A15),'Time Entry'!$C$2:$C$500)


note that you cannot use the whole column in this formula (A:A)

also note that if C2 is empty and any entry in A is empty than that
condition is TRUE since Excel count blanks a Jan
 
thanks - but it doesn't seem to be working. the data is not filtering into
the correct months. any other suggestions?

thanks.
 
The formula works so either I misunderstood what you are trying to do or
your data is not matching

My formula will sum all the entries in C2:C500 where the month in A2:A500 =
the month in C2 AND where B2:B500 = A15

of course if the values in either C2 or A2:A500 are text like January as
opposed to entries like 01/12/07, then it won't work but then again you
would get a value error
 

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

Similar Threads

Sum If function 3
SUM - IF - AND 7
use month in cell date to sum all relevant cells 2
Month wise Sum 4
Countif and sumif combination problem 2
Sum Data if Column B = Q 3
IF and OR statements 1
Complex formula 3

Back
Top