Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to add up numbers in cells that have letters in them. My problem
is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
If your input is in D2 to F2, try this in A2 =SUMPRODUCT((LEFT(D2:F2,1)="A")*(RIGHT(D2:F2))) and this in S2 =SUMPRODUCT((LEFT(D2:F2,1)="S")*(RIGHT(D2:F2))) Hope this helps. Andy. "PageRow" wrote in message ... I am trying to add up numbers in cells that have letters in them. My problem is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 9 Mar 2006 13:39:31 -0800, PageRow
wrote: I am trying to add up numbers in cells that have letters in them. My problem is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks With your three values in A1:C3 D1 is =SUMPRODUCT((LEFT($A1:$C1,1)="A")*(RIGHT($A$1:$C$1 ,LEN($A1:$C1)-1))) E1 is =SUMPRODUCT((LEFT($A1:$C1,1)="S")*(RIGHT($A$2:$C$2 ,LEN($A1:$C1)-1))) Change the A:E range as appropriate. These allow for more than one digit, e.g. A25. If there's only one digit in the cell then you can leave out the LEN($A1:$C1)-1 bit and just have 1. HTH Richard Buttrey __ |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This one worked on your test data:
=SUMPRODUCT(--(LEFT(A1:A3,1)="A"),--(RIGHT(A1:A3))) -- Kevin Vaughn "PageRow" wrote: I am trying to add up numbers in cells that have letters in them. My problem is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for your help, you three. Unfortunately, none of the formulas are
working! I am doing a cut and paste right into my formula bar, but I am getting a VALUE error. Here are some specifics of my entries: My cell range is D5:Q5, and the cell entry could be [A#], or [S#] (where # is a digit 1-9). I have two cells at S5 and V5 (A and S values, respectively) that I want the # values summed up. I was trying IF and VALUE and RIGHT statements, but I can't get those to work either. Thanks for helping! "PageRow" wrote: I am trying to add up numbers in cells that have letters in them. My problem is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The following array entered formulae (entered using cntl-shift-enter) assume
that only the first character is non numeric. If the characters are non numeric after the first character, you will get a Value error (any in the range.) =SUM(IF(LEFT($D5:$Q5, 1) = "A",VALUE(RIGHT($D5:$Q5,LEN($D5:$Q5) -1)), 0)) and =SUM(IF(LEFT($D5:$Q5, 1) = "S",VALUE(RIGHT($D5:$Q5,LEN($D5:$Q5) -1)), 0)) -- Kevin Vaughn "PageRow" wrote: Thanks for your help, you three. Unfortunately, none of the formulas are working! I am doing a cut and paste right into my formula bar, but I am getting a VALUE error. Here are some specifics of my entries: My cell range is D5:Q5, and the cell entry could be [A#], or [S#] (where # is a digit 1-9). I have two cells at S5 and V5 (A and S values, respectively) that I want the # values summed up. I was trying IF and VALUE and RIGHT statements, but I can't get those to work either. Thanks for helping! "PageRow" wrote: I am trying to add up numbers in cells that have letters in them. My problem is that there are two types of letters, and I want them to be added in an adjacent cell. Confusing? Yeah. OK, I want to add up the numbers from a row into two columns: "A" and "S". The user will input, say "A8", "S3", and "A4" in one row. I need a formula to recognize the difference and give an output of "12" in the "A" column, and "3" in the "S" column. I've tried VALUE and RIGHT, but it won't let me do a range of cells, or recognize the difference between "A" and "S". Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question about removing text from cells, leaving numbers | Excel Discussion (Misc queries) | |||
Linked cells and text boxes | Excel Discussion (Misc queries) | |||
Counting Occurrence of Text within Text in Cells in Range. | Excel Worksheet Functions | |||
Cells formated as numbers are calculating like text | Excel Discussion (Misc queries) | |||
Convert data of cells to any type: Number, Date&Time, Text | Excel Discussion (Misc queries) |