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  

ME, STRANGE SUMMATION



 
 
Thread Tools Display Modes
  #1  
Old September 1st, 2008, 08:08 AM posted to microsoft.public.excel.worksheet.functions
Berj
external usenet poster
 
Posts: 5
Default ME, STRANGE SUMMATION

Hi,

I can have the number 1 in several cells in a range of cells A1 to Z1, but
it is always filled starting from cell A1 and gradually to the right. May
also skip some cells.
Ex.
A1 to C1 may be blank, D1 is 1, then E1 to J1 is blank, then K1 is 1, and so
on.
I need a formula which adds up these 1s to the last position where a 1 is
found.

Summing up the cells till Z1 is not an option, since later, in another
formula I will find the sum of all the 1s AFTER the last 1 which was summed
up in the first formula.
This second formula will be relatively easy after I get the first formula.

I hope this was well understood.

Thanks in advance guys.
Berj

  #2  
Old September 1st, 2008, 08:21 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_2_]
external usenet poster
 
Posts: 1,562
Default ME, STRANGE SUMMATION

I am not sure I get why, but try this array formula

=SUM(A1:INDEX(A1:Z1,,MIN(IF((A1:Z1"")*(A1:Z11) ,COLUMN(A1:Z1)))-1))

--
__________________________________
HTH

Bob

"Berj" wrote in message
...
Hi,

I can have the number 1 in several cells in a range of cells A1 to Z1, but
it is always filled starting from cell A1 and gradually to the right. May
also skip some cells.
Ex.
A1 to C1 may be blank, D1 is 1, then E1 to J1 is blank, then K1 is 1, and
so
on.
I need a formula which adds up these 1s to the last position where a 1 is
found.

Summing up the cells till Z1 is not an option, since later, in another
formula I will find the sum of all the 1s AFTER the last 1 which was
summed
up in the first formula.
This second formula will be relatively easy after I get the first formula.

I hope this was well understood.

Thanks in advance guys.
Berj



  #3  
Old September 1st, 2008, 10:23 AM posted to microsoft.public.excel.worksheet.functions
RagDyeR
external usenet poster
 
Posts: 3,482
Default ME, STRANGE SUMMATION

Try this:

=SUM(A1:INDEX(A1:Z1,MATCH(99^99,A1:Z1)))

This totals to the last numeric cell.

Same result as
=Sum(A1:Z1)

Care to share your reason why the simple Sum formula does not work for you?
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Berj" wrote in message
...
Hi,

I can have the number 1 in several cells in a range of cells A1 to Z1, but
it is always filled starting from cell A1 and gradually to the right. May
also skip some cells.
Ex.
A1 to C1 may be blank, D1 is 1, then E1 to J1 is blank, then K1 is 1, and

so
on.
I need a formula which adds up these 1s to the last position where a 1 is
found.

Summing up the cells till Z1 is not an option, since later, in another
formula I will find the sum of all the 1s AFTER the last 1 which was

summed
up in the first formula.
This second formula will be relatively easy after I get the first formula.

I hope this was well understood.

Thanks in advance guys.
Berj


  #4  
Old September 1st, 2008, 02:55 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default ME, STRANGE SUMMATION

=SUM(1:1)


"Berj" wrote:

Hi,

I can have the number 1 in several cells in a range of cells A1 to Z1, but
it is always filled starting from cell A1 and gradually to the right. May
also skip some cells.
Ex.
A1 to C1 may be blank, D1 is 1, then E1 to J1 is blank, then K1 is 1, and so
on.
I need a formula which adds up these 1s to the last position where a 1 is
found.

Summing up the cells till Z1 is not an option, since later, in another
formula I will find the sum of all the 1s AFTER the last 1 which was summed
up in the first formula.
This second formula will be relatively easy after I get the first formula.

I hope this was well understood.

Thanks in advance guys.
Berj

 




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 05:02 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.