View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May Jim May is offline
external usenet poster
 
Posts: 430
Default how to formulate this???

If your example stays as simple as you present it;

In some cell, say C1 enter either your G or Your P

And the formula

=SUMPRODUCT(--(LEFT($A$1:$A$5,1)=C1),--(RIGHT(A1:A5,1)))

Will give you the 9 or the 5;




"formula" wrote in message
:

below:
in cell A1, i hv G6
cell A2: P3
cell A3: G1
cell A4: G2
cell A5: P2

how can i formulate G=9 or P=5???
i hv tried the function COUNTIF, but in vain. Help!!!
so many thxxxx