A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum Of Last Two Entries in Rotating Columns



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2009, 02:23 AM posted to microsoft.public.excel.worksheet.functions
Loadmaster
external usenet poster
 
Posts: 82
Default Sum Of Last Two Entries in Rotating Columns

Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last three
entries with the years across the top in row 1 and the months down column C
Now I am looking for the same type of formula only with the last two entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26 am PST.
  #2  
Old June 14th, 2009, 02:36 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sum Of Last Two Entries in Rotating Columns

Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26 am
PST.



  #3  
Old June 14th, 2009, 02:48 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sum Of Last Two Entries in Rotating Columns

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26 am
PST.





  #4  
Old June 14th, 2009, 01:05 PM posted to microsoft.public.excel.worksheet.functions
Loadmaster
external usenet poster
 
Posts: 82
Default Sum Of Last Two Entries in Rotating Columns

Thanks T. Valko, it worked but I also now need a conditional format that if
the value response is 1 ie -35 that the cell enters 0.

"T. Valko" wrote:

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26 am
PST.






  #5  
Old June 14th, 2009, 01:11 PM posted to microsoft.public.excel.worksheet.functions
Loadmaster
external usenet poster
 
Posts: 82
Default Sum Of Last Two Entries in Rotating Columns

forget my last response. In cell B35 I entered your formula. then in cell B34
I entered =30 - B35. If the response is less than 1 enter 0 . If the response
is 1 or greater I would like it to just enter the figure. Sorry for the
confusing last response.


"T. Valko" wrote:

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26 am
PST.






  #6  
Old June 14th, 2009, 05:13 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sum Of Last Two Entries in Rotating Columns

Try this in B34:

=(30-B35=1)*B35

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
forget my last response. In cell B35 I entered your formula. then in cell
B34
I entered =30 - B35. If the response is less than 1 enter 0 . If the
response
is 1 or greater I would like it to just enter the figure. Sorry for the
confusing last response.


"T. Valko" wrote:

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down
column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26
am
PST.







  #7  
Old June 15th, 2009, 02:26 AM posted to microsoft.public.excel.worksheet.functions
Loadmaster
external usenet poster
 
Posts: 82
Default Sum Of Last Two Entries in Rotating Columns

That didn't answer my question, I was using the array formula
formula=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=L ARGE((COLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13 ""),2),
D2:AH13)) in cell B35. When I entered the figure 1.0 in Jun of 2009 added to
23.6 in May of 2009 I expected the response to be 5.4 in cell B34 because
that is what is require to reach 30. Had I entered 6.4 or 65.5 or 20.2 in Jun
of 2009 the response should come up with 0 as the figure 30 has already been
met when adding the two figures together.


"T. Valko" wrote:

Try this in B34:

=(30-B35=1)*B35

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
forget my last response. In cell B35 I entered your formula. then in cell
B34
I entered =30 - B35. If the response is less than 1 enter 0 . If the
response
is 1 or greater I would like it to just enter the figure. Sorry for the
confusing last response.


"T. Valko" wrote:

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the last
three
entries with the years across the top in row 1 and the months down
column
C
Now I am looking for the same type of formula only with the last two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @ 7:26
am
PST.








  #8  
Old June 15th, 2009, 02:55 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sum Of Last Two Entries in Rotating Columns

Maybe this:

=(30-B35=1)*(30-B35)

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
That didn't answer my question, I was using the array formula
formula=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=L ARGE((COLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13 ""),2),
D2:AH13)) in cell B35. When I entered the figure 1.0 in Jun of 2009 added
to
23.6 in May of 2009 I expected the response to be 5.4 in cell B34 because
that is what is require to reach 30. Had I entered 6.4 or 65.5 or 20.2 in
Jun
of 2009 the response should come up with 0 as the figure 30 has already
been
met when adding the two figures together.


"T. Valko" wrote:

Try this in B34:

=(30-B35=1)*B35

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
forget my last response. In cell B35 I entered your formula. then in
cell
B34
I entered =30 - B35. If the response is less than 1 enter 0 . If the
response
is 1 or greater I would like it to just enter the figure. Sorry for the
confusing last response.


"T. Valko" wrote:

P.S.

It seems to be counter-intuitive to use n+1 for the variable.

Try this version for the last 2:

=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)=LARGE((C OLUMN(D2:AH13)*100+ROW(D2:AH13))*(D2:AH13""),2),
D2:AH13))

I changed "" to "=" and used the literal variable.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Replace the 4 with 3.

Don't forget to array enter!

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
Hi daddylonglegs came up with the array formula
=SUM(IF(COLUMN(D2:AH13)*100+ROW(D2:AH13)LARGE((CO LUMN(D2:AH13)*100+ROW(D2:AH13))*(
D2:AH13""),4), D2:AH13)) . This formula gave me the sum of the
last
three
entries with the years across the top in row 1 and the months down
column
C
Now I am looking for the same type of formula only with the last
two
entries
vice the last three entries. Daddylonglegs post was 7/19/2008 @
7:26
am
PST.










 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:35 PM.


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