Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default formula to only calculate the last 15 entries?

I have a spreadsheet where we are showing wins, losses, and total points
scored. We also show the same data but for only the last 15 matches. Is
there a way to have a cell only take the last 15 entries even though there
might be 100 entries.

Currently we have the cell such as this: Cell A1 has the wins inputted as
follows: "=5+5+5+5+5+5+5". As each week passes, we enter another value in
a1. I'd like to use cell a2 to calculate the numbers of the last 15 entries
of a1.

Any help is appreciated.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default formula to only calculate the last 15 entries?

With the scores in indivuidual cells we would have a shot at extracting the
last 15 entries, but with everything in one cell the solution becomes very
complicated involving a bunch of VBA code.
--
HTH...

Jim Thomlinson


"April" wrote:

I have a spreadsheet where we are showing wins, losses, and total points
scored. We also show the same data but for only the last 15 matches. Is
there a way to have a cell only take the last 15 entries even though there
might be 100 entries.

Currently we have the cell such as this: Cell A1 has the wins inputted as
follows: "=5+5+5+5+5+5+5". As each week passes, we enter another value in
a1. I'd like to use cell a2 to calculate the numbers of the last 15 entries
of a1.

Any help is appreciated.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default formula to only calculate the last 15 entries?

April,


If you enter your scores as text (you put an apostrophe before the "=") and
your scores can never be more than 9 (1 digit long) then you could try:

Sub Last15()
Dim Score15 As String
Dim Total15 As Integer
Dim Counter as Integer

'Make sure the there are at least 15 scores entered
If Len(Range("A1").Value) =30 Then
'Take the last 15 entries from A1
Score15 = Right(Range("A1").Value,29)
Total15 = 0
'Step through the string adding the scores but missing the "+"s
For Counter = 1 To 29 Step 2
Total15 =Total15 + Val(Mid(Score15,Counter,1))
Next Counter
Range("A2").Value = Total15
Else
Range("A2").Value = "Not enough results"
End If
End Sub

Henry

"April" wrote in message
...
I have a spreadsheet where we are showing wins, losses, and total points
scored. We also show the same data but for only the last 15 matches. Is
there a way to have a cell only take the last 15 entries even though there
might be 100 entries.

Currently we have the cell such as this: Cell A1 has the wins inputted as
follows: "=5+5+5+5+5+5+5". As each week passes, we enter another value
in a1. I'd like to use cell a2 to calculate the numbers of the last 15
entries of a1.

Any help is appreciated.






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
needing to calculate entries, but no the spaces in some cells joflo65 Excel Worksheet Functions 2 May 6th 08 04:40 PM
Calculate the difference between two cell entries using NOW() func CZeigler Excel Worksheet Functions 1 July 7th 06 05:53 PM
find the same entries and calculate sum Alex Excel Worksheet Functions 8 March 24th 06 11:25 PM
Any way to calculate an average for more than 30 entries? torin_drake Excel Worksheet Functions 1 February 16th 05 01:59 PM
How to calculate Total for different Group from user entries unplugs[_7_] Excel Programming 1 June 11th 04 09:07 AM


All times are GMT +1. The time now is 05:59 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"