I
I
iRumba2015-05-06 12:42:20
Google Sheets
iRumba, 2015-05-06 12:42:20

How to sum INT-INT ranges in Google Sheets?

Suppose there is a column in which the data can be ordinary numbers or ranges:
100
2000
300-500
850
500-1500
at the output I want to get the result of INT-INT
in this case 3750-4950
and if they are equal, then just a number.
Help with the formula. The variant with splitting the data into 2 columns does not suit me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zubarev, 2015-05-07
@iRumba

  1. Write a macro, for example, in Google Drive it is written in JS (if you really want to completely without extra columns).
    For example, using the following formulas (in LO):
    Left part =IFERROR(MID(A2,1,FIND("-",A2)-1),A2)+0
    Right part =IFERROR(MID(A2,FIND("-",A2)+1,LEN(A2)-1),A2)+0
    "+0" serve to turn the text into a number.
    Sum --=IF(B7=C7,B7,CONCATENATE(B7,"-",C7))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question