+ Reply to Thread
Results 1 to 5 of 5

Combining 2 cells numbers unless one doesn't exist

Hybrid View

  1. #1
    Registered User
    Join Date
    07-11-2007
    Location
    Orlando, Florida
    Posts
    48

    Question Combining 2 cells numbers unless one doesn't exist

    I have worked with this solution for almost 2 days now. Can anyone help? I have 2 cells that combine into a 3rd cell; adding the first 2 cells together. What I'm looking to do: say A1 has a number and A2 does or doesn't have a value. I'm looking to return the value of the number in A2 only if there's a number. I looked at ISTEXT, COUNTIF, or possibly using an if statement. I'm not sure which way to go.

    Thanks in advance!
    D~

  2. #2
    Registered User
    Join Date
    10-06-2003
    Location
    Ashford, Kent - Working in London
    MS-Off Ver
    Office 365
    Posts
    95
    I could have misunderstood your query, but if A2 holds text and you try to add it to A1 it will show an error.....and that could be the trigger for reverting to an alternative sum?

    i.e. =IF(ISERROR(A1+A2)=TRUE,A2,A1+A2)

    Hope this helps?

    Chris.
    Big Chris

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You could try something like this:

    =A1+IF(ISNUMBER(A2),A2)

    HTH

    Jason

  4. #4
    Registered User
    Join Date
    07-11-2007
    Location
    Orlando, Florida
    Posts
    48
    Thank you both for the reply. Jason hit it on the head with what I had added to the end of A2. Thank you.
    D~

  5. #5
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by desk.doc
    I have worked with this solution for almost 2 days now. Can anyone help? I have 2 cells that combine into a 3rd cell; adding the first 2 cells together. What I'm looking to do: say A1 has a number and A2 does or doesn't have a value. I'm looking to return the value of the number in A2 only if there's a number. I looked at ISTEXT, COUNTIF, or possibly using an if statement. I'm not sure which way to go.

    Thanks in advance!
    D~
    =SUM(A1:A2)

    SUM function ignore text

+ 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