Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
R.P.McMurphy
 
Posts: n/a
Default Why is this not working?

why is this not working? it should add up the values of every 6th cell (H6
through to FB6), but if any cell is over the value of D6 then D6 's value is
taken as the value for that particular cell in that particular instance. it
seemed to be working, but if i enter a value of over D6 in H6 etc, the
answer is worng.

=SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*(H6:FB6<=D6) *H6:FB6)+D6*SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*( H6:FB6D6))

cheers!

steve


  #2   Report Post  
Domenic
 
Posts: n/a
Default

The formula seems to work as you've described. Let's take a look at the
following example where...

D6 contains 100

H6 contains 180

N6 contains 60

T6 contains 160

Z6 contains 80

....shouldn't the answer be 340?

In article ,
"R.P.McMurphy" wrote:

why is this not working? it should add up the values of every 6th cell (H6
through to FB6), but if any cell is over the value of D6 then D6 's value is
taken as the value for that particular cell in that particular instance. it
seemed to be working, but if i enter a value of over D6 in H6 etc, the
answer is worng.

=SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*(H6:FB6<=D6) *H6:FB6)+D6*SUMPRODUCT((MOD(
COLUMN(H6:FB6),6)=2)*(H6:FB6D6))

cheers!

steve

  #3   Report Post  
R.P.McMurphy
 
Posts: n/a
Default

yes it should.

but its not working. let me give you the full formula as im using it.

=(SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=1)*(H6:FB6<=D6 )*H6:FB6)+D6*SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=1)* (H6:FB6D6)+FK6))*(D6*$E6)/(D6*52)

its as before, only with adding FJ6 what ever its value and then multipling
the whole answer by (D6*E6)/(D6*52)

any help?

steve


"Domenic" wrote in message
...
The formula seems to work as you've described. Let's take a look at the
following example where...

D6 contains 100

H6 contains 180

N6 contains 60

T6 contains 160

Z6 contains 80

...shouldn't the answer be 340?

In article ,
"R.P.McMurphy" wrote:

why is this not working? it should add up the values of every 6th cell
(H6
through to FB6), but if any cell is over the value of D6 then D6 's value
is
taken as the value for that particular cell in that particular instance.
it
seemed to be working, but if i enter a value of over D6 in H6 etc, the
answer is worng.

=SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*(H6:FB6<=D6) *H6:FB6)+D6*SUMPRODUCT((MOD(
COLUMN(H6:FB6),6)=2)*(H6:FB6D6))

cheers!

steve



  #4   Report Post  
R.P.McMurphy
 
Posts: n/a
Default

ive just tryied it further down the sheet and it seems to work ok...using
this

=(SUMPRODUCT((MOD(COLUMN(G24:FA24),6)=1)*(G24:FA24 <=C24)*G24:FA24)+C24*SUMPRODUCT((MOD(COLUMN(G24:FA 24),6)=1)*(G24:FA24C24)+FJ24))*(C24*$E24)/(C24*52)

odd

steve
"Domenic" wrote in message
...
The formula seems to work as you've described. Let's take a look at the
following example where...

D6 contains 100

H6 contains 180

N6 contains 60

T6 contains 160

Z6 contains 80

...shouldn't the answer be 340?

In article ,
"R.P.McMurphy" wrote:

why is this not working? it should add up the values of every 6th cell
(H6
through to FB6), but if any cell is over the value of D6 then D6 's value
is
taken as the value for that particular cell in that particular instance.
it
seemed to be working, but if i enter a value of over D6 in H6 etc, the
answer is worng.

=SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*(H6:FB6<=D6) *H6:FB6)+D6*SUMPRODUCT((MOD(
COLUMN(H6:FB6),6)=2)*(H6:FB6D6))

cheers!

steve



  #5   Report Post  
R.P.McMurphy
 
Posts: n/a
Default

sorted. got a bracet in the wrong place! ;-)

steve

"Domenic" wrote in message
...
The formula seems to work as you've described. Let's take a look at the
following example where...

D6 contains 100

H6 contains 180

N6 contains 60

T6 contains 160

Z6 contains 80

...shouldn't the answer be 340?

In article ,
"R.P.McMurphy" wrote:

why is this not working? it should add up the values of every 6th cell
(H6
through to FB6), but if any cell is over the value of D6 then D6 's value
is
taken as the value for that particular cell in that particular instance.
it
seemed to be working, but if i enter a value of over D6 in H6 etc, the
answer is worng.

=SUMPRODUCT((MOD(COLUMN(H6:FB6),6)=2)*(H6:FB6<=D6) *H6:FB6)+D6*SUMPRODUCT((MOD(
COLUMN(H6:FB6),6)=2)*(H6:FB6D6))

cheers!

steve





  #6   Report Post  
Domenic
 
Posts: n/a
Default

In article ,
"R.P.McMurphy" wrote:

ive just tryied it further down the sheet and it seems to work ok...using
this

=(SUMPRODUCT((MOD(COLUMN(G24:FA24),6)=1)*(G24:FA24 <=C24)*G24:FA24)+C24*SUMPROD
UCT((MOD(COLUMN(G24:FA24),6)=1)*(G24:FA24C24)+FJ2 4))*(C24*$E24)/(C24*52)

odd


The reason this works is that you've changed your starting column. The
MOD part...

(MOD(COLUMN(G24:FA24),6)=1)

....means that every 6th cell is evaluated as TRUE starting with G24,
whereas in your previous formula...

(MOD(COLUMN(H6:FB6),6)=1)

....means that every 6th cell is evaluated as TRUE starting with M6 not
H6. To start with H6 you would need to change '=1' to '=2'.

However, you could use the following instead...

(MOD(COLUMN(H6:FB6)-COLUMN(H6),6)=0)

....which would always ensure that every 6th cell is evaluated as TRUE
starting with the first cell in the range, in this case H6. Also, it
would allow you to insert a new column before Column H without affecting
the formula.

Hope this helps!
  #7   Report Post  
R.P.McMurphy
 
Posts: n/a
Default

hehe...yep i got it now! tar muchly!

steve

"Domenic" wrote in message
...
In article ,
"R.P.McMurphy" wrote:

ive just tryied it further down the sheet and it seems to work ok...using
this

=(SUMPRODUCT((MOD(COLUMN(G24:FA24),6)=1)*(G24:FA24 <=C24)*G24:FA24)+C24*SUMPROD
UCT((MOD(COLUMN(G24:FA24),6)=1)*(G24:FA24C24)+FJ2 4))*(C24*$E24)/(C24*52)

odd


The reason this works is that you've changed your starting column. The
MOD part...

(MOD(COLUMN(G24:FA24),6)=1)

...means that every 6th cell is evaluated as TRUE starting with G24,
whereas in your previous formula...

(MOD(COLUMN(H6:FB6),6)=1)

...means that every 6th cell is evaluated as TRUE starting with M6 not
H6. To start with H6 you would need to change '=1' to '=2'.

However, you could use the following instead...

(MOD(COLUMN(H6:FB6)-COLUMN(H6),6)=0)

...which would always ensure that every 6th cell is evaluated as TRUE
starting with the first cell in the range, in this case H6. Also, it
would allow you to insert a new column before Column H without affecting
the formula.

Hope this helps!



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
Formula to find the working days difference between to dates? Mudgeman Excel Discussion (Misc queries) 2 May 15th 06 04:26 AM
how do i count how many people are working between two times in e APYDS Excel Worksheet Functions 4 August 16th 05 08:11 PM
Working time and days Nortos Excel Worksheet Functions 5 May 6th 05 04:17 PM
Working time and days Nortos Excel Discussion (Misc queries) 1 May 6th 05 03:47 PM
Trace Dependents and Precedents not working Manish Excel Worksheet Functions 0 April 11th 05 09:39 PM


All times are GMT +1. The time now is 12:08 AM.

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"