Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Sum Of Last Three Entries In Rotating Columns

Hi, I entered the years in row 4, 2006, 2007 etc€¦ starting in E4 and working
right. I then entered Jan thru to Dec in Column D, starting at D5. At the end
of each month I enter a value within the spreadsheet Corresponding to the
Month and Year. How do I get the sum of the last three months when the value
data is entered down one column and then starts back up and down the next
column to the right?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Sum Of Last Three Entries In Rotating Columns

So let's assume that your years extend as far as J4 and therefore your
numbers are in E5:J16. This formula will sum the last 3 entries irrespective
of the current date:


=SUM(IF(COLUMN(E5:J16)*100+ROW(E5:J16)LARGE((COLU MN(E5:J16)*100+ROW(E5:J16))*(E5:J16<""),4),E5:J16 ))

This is an "array formula" which must be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar

Note: assumes that there won't be gaps in the data


"Loadmaster" wrote:

Hi, I entered the years in row 4, 2006, 2007 etc€¦ starting in E4 and working
right. I then entered Jan thru to Dec in Column D, starting at D5. At the end
of each month I enter a value within the spreadsheet Corresponding to the
Month and Year. How do I get the sum of the last three months when the value
data is entered down one column and then starts back up and down the next
column to the right?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Sum Of Last Three Entries In Rotating Columns

That formula worked great, however I have one more question WRT the same
spreadsheet. How do I retrieve the last entry from the last row and column?

"daddylonglegs" wrote:

So let's assume that your years extend as far as J4 and therefore your
numbers are in E5:J16. This formula will sum the last 3 entries irrespective
of the current date:


=SUM(IF(COLUMN(E5:J16)*100+ROW(E5:J16)LARGE((COLU MN(E5:J16)*100+ROW(E5:J16))*(E5:J16<""),4),E5:J16 ))

This is an "array formula" which must be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar

Note: assumes that there won't be gaps in the data


"Loadmaster" wrote:

Hi, I entered the years in row 4, 2006, 2007 etc€¦ starting in E4 and working
right. I then entered Jan thru to Dec in Column D, starting at D5. At the end
of each month I enter a value within the spreadsheet Corresponding to the
Month and Year. How do I get the sum of the last three months when the value
data is entered down one column and then starts back up and down the next
column to the right?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sum Of Last Three Entries In Rotating Columns

=LOOKUP(2,1/(A1:A20000<""),A1:A20000)

for the last row in A1:A20000

adapt to fit


=LOOKUP(2,1/(2:2<""),2:2)

last column in row 2


--


Regards,


Peo Sjoblom






"Loadmaster" wrote in message
...
That formula worked great, however I have one more question WRT the same
spreadsheet. How do I retrieve the last entry from the last row and
column?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Sum Of Last Three Entries In Rotating Columns

What I meant to say was enter the row within the last column not both the
last column and last row.

"Peo Sjoblom" wrote:

=LOOKUP(2,1/(A1:A20000<""),A1:A20000)

for the last row in A1:A20000

adapt to fit


=LOOKUP(2,1/(2:2<""),2:2)

last column in row 2


--


Regards,


Peo Sjoblom






"Loadmaster" wrote in message
...
That formula worked great, however I have one more question WRT the same
spreadsheet. How do I retrieve the last entry from the last row and
column?






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Sum Of Last Three Entries In Rotating Columns

For the last entry only try

=LOOKUP(9.999999999999E+307,INDEX(E5:J16,0,MAX(IF( E5:J16<"",COLUMN(E5:J16)-COLUMN(E5)+1))))

"Peo Sjoblom" wrote:

=LOOKUP(2,1/(A1:A20000<""),A1:A20000)

for the last row in A1:A20000

adapt to fit


=LOOKUP(2,1/(2:2<""),2:2)

last column in row 2


--


Regards,


Peo Sjoblom






"Loadmaster" wrote in message
...
That formula worked great, however I have one more question WRT the same
spreadsheet. How do I retrieve the last entry from the last row and
column?




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Sum Of Last Three Entries In Rotating Columns

Thank-you, that formula also worked great.

"daddylonglegs" wrote:

For the last entry only try

=LOOKUP(9.999999999999E+307,INDEX(E5:J16,0,MAX(IF( E5:J16<"",COLUMN(E5:J16)-COLUMN(E5)+1))))

"Peo Sjoblom" wrote:

=LOOKUP(2,1/(A1:A20000<""),A1:A20000)

for the last row in A1:A20000

adapt to fit


=LOOKUP(2,1/(2:2<""),2:2)

last column in row 2


--


Regards,


Peo Sjoblom






"Loadmaster" wrote in message
...
That formula worked great, however I have one more question WRT the same
spreadsheet. How do I retrieve the last entry from the last row and
column?




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
Finding entries across columns bollard Excel Worksheet Functions 2 May 6th 08 03:04 PM
Rotating Rows To Columns Tripp K Excel Discussion (Misc queries) 1 December 13th 06 02:44 AM
Counting entries in 2+ columns petess Excel Discussion (Misc queries) 6 April 4th 06 03:42 PM
common entries between 2 columns Andreas Excel Worksheet Functions 2 July 18th 05 02:33 AM
Remove dup entries in 2 columns 70,000+ platanoprincess Excel Discussion (Misc queries) 1 January 20th 05 02:23 PM


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

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

About Us

"It's about Microsoft Excel"