Array formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using an array funtion to sum a numbers followed by a letter. Example
3H,4H, etc...,
The formula looks like this:
=SUM(IF(RIGHT(C4:AD4,1)="H",--LEFT(C4:AD4,LEN(C4:AD4)-1)))

How can I add numbers followed by two letters. Example 3CT, 4CT, etc...
What do I have to do different in the function.

Thanks
 
Always CT?

=SUM(IF(RIGHT(C4:AD4,2)="ct",--LEFT(C4:AD4,LEN(C4:AD4)-2)))

Notice that the =right() was changed to look at 2 characters and the len() now
had 2 subtracted from it.
 
I am getting a #VALUE error with this. Whta could be going on?

Thanks
 
I figured it out. I one of the cells there was only text causing the error.
Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Learning arrays. 13
someone please shorten this formula... 6
Excel 2007 Nested formulas 2
IF ISERROR INDIRECT MATCH Formula Question??? 19
Copy formulas 2
The One Formula 8
Adding formula 1
Counting formula 1

Back
Top