+ Reply to Thread
Results 1 to 5 of 5

Trying to add numeric values in range

  1. #1
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Trying to add numeric values in range

    Hello All,

    In A1:Z1 I have a letter and a number in each cell, e.g. (C4, V5, B8, etc).
    In AA:1 I need a formula that would the add the number(s) in A1:Z1 that match a certain letter, in this example the letter V. If V3, V6, V1 appear in the range of A1:Z1 it should return a value of 10.

    I tired the =SUMIF(A1:Z1,"=V",A1:Z1) but it returns a zero.

    Any help would be appreciated, thanks.

    Mike

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    You are on the right track. It depends on the structure of the data in your cells. Is the letter always a single character. if so, you can break apart the letter from the number like this. It would be easier to do this in a few steps rather than 1 formula

    cell A2 enter
    =left(A1,1)
    will give you the letter

    cell A3, enter
    =right(A1,len(A1)-1)
    will give you the number

    You can then do your sumif, summing the third row based on the condition in the second row.

    Matt

  3. #3
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158
    Hi Matt,

    After doing your 2 step formula, the =SUMIF doesn't work. I noticed that in the 2nd part, the numbers are on the left side of the cell, maybe the =SUMIF formula thinks that they are text.

    Also I just realized that some of the numbers may be a decimal but the highest number would be an eight.

    Mike

  4. #4
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    Yes, you are right. It will show the numbers as text. Just put a =value() statement around it

    =VALUE(right(A1,len(A1)-1))

    Matt

  5. #5
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158
    Thanks Matt,

    got it working.

    Mike

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1