#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default IF SUM Formula

In A2 enter:
=LEFT(A1,1) and copy across

In A3 enter:
=--IF(LEN(A1)=0,0,MID(A1,2,255)) and copy across

We see:

h7.5 s5 h7.5 s7.5 h10.5
h s h s h
7.5 5 0 7.5 7.5 0 10.5

Finally:
=SUMPRODUCT((A2:G2="h")*(A3:G3))
will display 25.5

--
Gary''s Student - gsnu200909


"PK" wrote:

I am trying to sum part of a cell and group by the initial letter of that
formula.
Example - data in cells A1 to G1 as follows:
h7.5 s5 blank cell h7.5 s7.5 blank cell h10.5
I would like to sum all numbers that have a pre-fix of "h" in their cell.

Thanks.
--
PK wilts

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



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