View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daniel Daniel is offline
external usenet poster
 
Posts: 354
Default testing range of cells for part of cell content

ohhh I understand. I wasn't doing the ctrl+shft+enter thing before. that
works perfectly, thanks!

what are the hyphens in the formula for?

Thanks for the support!

Daniel

"T. Valko" wrote:

Try this array formula**.

=SUM(IF(LEFT(A1:A10)="P",IF(ISNUMBER(-RIGHT(A1:A10)),--MID(A1:A10,2,2))))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Daniel" wrote in message
...
Yes, I believe so. They will all be either letter followed by two digits
or 3
letters.

"T. Valko" wrote:

I need my formula to sum the last two digits
of only the values starting with "P" and that
have a number for the last two.

Ok

Will the entries to be summed *always* be 3 characters long starting with
a
"P" follwed by a 2 digit number?

--
Biff
Microsoft Excel MVP


"Daniel" wrote in message
...
Hi, I'm new to advanced excel formulas so please bear with me.

So I'm trying to make a formula that sums only certain values in a
range
of
cells. The problem is I need to manipulate each cell content before
testing/adding to the sum (but not do this permanently of course). For
example, if i have a range of 3 cells that contain the values "P90",
"PHP",
"B60", I need my formula to sum the last two digits of only the values
starting with "P" and that have a number for the last two.

I haven't been able to get something like this to work, even for really
simple formulas like counting the number of cells whose right character
is
numeric or summing the right characters of all cells in a range. Any
suggestions? Maybe i'm thinking of this from too much of a programming
perspective?

Thanks
Daniel


.



.