Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Zakynthos
 
Posts: n/a
Default Checking if a cell entry is correct before adding it to another

I want to add all values in column F, (a+b+c etc, below) corresponding to a
description in column C of "08:15" and to ensure that any value corresponding
to ANY TIME OTHER THAN 08:15 was NOT INCLUDED in the total

Example:

C1 contains the time "08:15"
F1 contains the value to be added, which I will call "a"
C365 contains the time "08:15"
F365 contains the second value to be added which I will call "b"
C729 contains the time "08:15"
F729 contains the third value to be added which I will call "c" , etc etc

Two questions, then:

1. What formula could I input to achieve the above, i.e. to get the sum of
a+b+c ?

2. I also want to ensure that if one of the cells in column C showed a time
other than 08:15 that the value in the corresponding column F was NOT added,
so for example if C729 above had "08:30" instead of "08:15", I would not want
value "c" above included in my total.

Many thanks for your help !!!!


  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

Try

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)


"Zakynthos" wrote:

I want to add all values in column F, (a+b+c etc, below) corresponding to a
description in column C of "08:15" and to ensure that any value corresponding
to ANY TIME OTHER THAN 08:15 was NOT INCLUDED in the total

Example:

C1 contains the time "08:15"
F1 contains the value to be added, which I will call "a"
C365 contains the time "08:15"
F365 contains the second value to be added which I will call "b"
C729 contains the time "08:15"
F729 contains the third value to be added which I will call "c" , etc etc

Two questions, then:

1. What formula could I input to achieve the above, i.e. to get the sum of
a+b+c ?

2. I also want to ensure that if one of the cells in column C showed a time
other than 08:15 that the value in the corresponding column F was NOT added,
so for example if C729 above had "08:30" instead of "08:15", I would not want
value "c" above included in my total.

Many thanks for your help !!!!


  #3   Report Post  
Zakynthos
 
Posts: n/a
Default

I gave it a go, inputting the formula:

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)

into, say, G1, G53 etc, both cells corresponding with 8:15 am for 2
consecutive days - where F1 and F53 contained 2 of the values I wanted to
add - and the formula certainly LOOKS as if it SHOULD produce the correct
result - BUT... all I got was a: #DIV/0!

Any suggestions about where I've gone (horribly) wrong???





"Duke Carey" wrote:

Try

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)


"Zakynthos" wrote:

I want to add all values in column F, (a+b+c etc, below) corresponding to a
description in column C of "08:15" and to ensure that any value corresponding
to ANY TIME OTHER THAN 08:15 was NOT INCLUDED in the total

Example:

C1 contains the time "08:15"
F1 contains the value to be added, which I will call "a"
C365 contains the time "08:15"
F365 contains the second value to be added which I will call "b"
C729 contains the time "08:15"
F729 contains the third value to be added which I will call "c" , etc etc

Two questions, then:

1. What formula could I input to achieve the above, i.e. to get the sum of
a+b+c ?

2. I also want to ensure that if one of the cells in column C showed a time
other than 08:15 that the value in the corresponding column F was NOT added,
so for example if C729 above had "08:30" instead of "08:15", I would not want
value "c" above included in my total.

Many thanks for your help !!!!


  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

1) I'm very confused about how you could have gotten a divide by zero error.
2) You need to use the formula in only one cell, as it will sum all of the
column F values where the text in C = "08:15". Simply copy the original
formula from the post and paste it into a single cell

Now, if column C actually contains time values and not text representations
of time, that's a different story. If that's the case, post back and we'll
give you a modified formula.

"Zakynthos" wrote:

I gave it a go, inputting the formula:

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)

into, say, G1, G53 etc, both cells corresponding with 8:15 am for 2
consecutive days - where F1 and F53 contained 2 of the values I wanted to
add - and the formula certainly LOOKS as if it SHOULD produce the correct
result - BUT... all I got was a: #DIV/0!

Any suggestions about where I've gone (horribly) wrong???





"Duke Carey" wrote:

Try

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)


"Zakynthos" wrote:

I want to add all values in column F, (a+b+c etc, below) corresponding to a
description in column C of "08:15" and to ensure that any value corresponding
to ANY TIME OTHER THAN 08:15 was NOT INCLUDED in the total

Example:

C1 contains the time "08:15"
F1 contains the value to be added, which I will call "a"
C365 contains the time "08:15"
F365 contains the second value to be added which I will call "b"
C729 contains the time "08:15"
F729 contains the third value to be added which I will call "c" , etc etc

Two questions, then:

1. What formula could I input to achieve the above, i.e. to get the sum of
a+b+c ?

2. I also want to ensure that if one of the cells in column C showed a time
other than 08:15 that the value in the corresponding column F was NOT added,
so for example if C729 above had "08:30" instead of "08:15", I would not want
value "c" above included in my total.

Many thanks for your help !!!!


  #5   Report Post  
Zakynthos
 
Posts: n/a
Default

Sorry!

My fault for not checking through all the columns carefully enough. Column C
does contain time values, but the problem leading to the divide by zero error
was that some cells in column F were blank because there was no data for
Sundays in the month. I've corrected this by inserting random data. Many
thanks for your help.

"Duke Carey" wrote:

1) I'm very confused about how you could have gotten a divide by zero error.
2) You need to use the formula in only one cell, as it will sum all of the
column F values where the text in C = "08:15". Simply copy the original
formula from the post and paste it into a single cell

Now, if column C actually contains time values and not text representations
of time, that's a different story. If that's the case, post back and we'll
give you a modified formula.

"Zakynthos" wrote:

I gave it a go, inputting the formula:

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)

into, say, G1, G53 etc, both cells corresponding with 8:15 am for 2
consecutive days - where F1 and F53 contained 2 of the values I wanted to
add - and the formula certainly LOOKS as if it SHOULD produce the correct
result - BUT... all I got was a: #DIV/0!

Any suggestions about where I've gone (horribly) wrong???





"Duke Carey" wrote:

Try

=SUMPRODUCT(--(C1:C1000="08:15"),F1:F1000)


"Zakynthos" wrote:

I want to add all values in column F, (a+b+c etc, below) corresponding to a
description in column C of "08:15" and to ensure that any value corresponding
to ANY TIME OTHER THAN 08:15 was NOT INCLUDED in the total

Example:

C1 contains the time "08:15"
F1 contains the value to be added, which I will call "a"
C365 contains the time "08:15"
F365 contains the second value to be added which I will call "b"
C729 contains the time "08:15"
F729 contains the third value to be added which I will call "c" , etc etc

Two questions, then:

1. What formula could I input to achieve the above, i.e. to get the sum of
a+b+c ?

2. I also want to ensure that if one of the cells in column C showed a time
other than 08:15 that the value in the corresponding column F was NOT added,
so for example if C729 above had "08:30" instead of "08:15", I would not want
value "c" above included in my total.

Many thanks for your help !!!!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Adding a fixed date to a cell Erik Jahre Excel Worksheet Functions 2 June 20th 05 10:00 PM
How is it that a cell can transfer the correct formula, but the w. kbigs Excel Discussion (Misc queries) 3 January 12th 05 03:56 PM
Only using the correct cell for the sum craigwojo Excel Worksheet Functions 1 November 7th 04 10:36 PM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"