Hi,

I have a spreadsheet 4 columns, shown below:

| Col A | Col B | Col C | Col D |
1| A |56-20 | | |
2| H |12-24 | | |

There are multiple rows. Col A can only be an A or an H. Col B displays any combination of numeric values separated by a -, eg 102-3. Col B will change at specific intervals. The formula needs to cope with this.

In cell C1: If A1 = A display 20 (from B1) Else If A1 = H then display 56 (from B1). If there is nothing in B1, C1 = 0.

Also:
In cell D1: If A1 = H display 56 (from B1). If Col A = A display 20 (from B1). If there is nothing present in B1, D1 should show a 0.

Both formulas need to be present in their respective columns where data is present in A and B.