View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default

One way ..

Assume data below is in Sheet1,
cols A and B, in row2 down

S4 4
S8 8
A8 8
A9 9
etc

In Sheet2
-------------
Assuming B1:C1 contains: A, S

Put in B2:

=SUMPRODUCT(--(LEFT(Sheet1!$A$2:$A$100,1)=B$1),Sheet1!$B$2:$B$10 0)

Copy across to C2

For the sample data in Sheet1:
B2 will return 17, C2 returns 12

Adapt the ranges to suit ..

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Texas-DC_271" wrote in message
...
I have a row of cells that I need to add. The row of cells do not
contain a number but rather a text value. I have created a table
linking my text values to my number values. The problem I have is
that each cell to be added may or may not have a value that is in the
table and I need the function to over look that problem.

Say I have 7 cells. Three of the cells are blank (or null), one of
the cells value is S4, another cells value is S8, and the other two
cells have a value of A8 and A9 respectively.
I need to add all of the cells but only want the values of the cells
that have a text value that starts with "A". The other cells should
be looked at as "0"

I have tried to use VLOOKUP but I would have to have over 38 different
VLOOKUP functions to add, and that is not working too well for me.

Is there an easer way that I just can't see?

DATA

S4 = 4
S8 = 8
A8 = 8
A9 = 9
"A" "S"
| A | B | C | D | E | F | G | H | I |
| | | | | | | | | |
| S4 | A8 | | S8 | | A9 | | 17 | 12 |

Thanks for any help possible,
David