Find first cell in a row that contains a number?

Posted by Dexter on Stack Overflow See other posts from Stack Overflow or by Dexter
Published on 2010-12-22T17:13:55Z Indexed on 2010/12/22 17:54 UTC
Read the original article Hit count: 127

Filed under:
|
|

I'm working in Excel with an exported table such as this:

|-------------------------------------------------------------------------------|
|   |        A          |  B  |  C  |  D  |  E  |  F  |   G   |  H  |     I     |
|---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------|
| 1 |      Domain       | JAN | FEB | MAR | APR | MAY | Start | End |   Change  |
|---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------|
| 2 | www.mydomain1.com |     |   1 |   4 |   3 |   1 |     1 |   1 |         0 |
|---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------|
| 3 | www.mydomain2.com |   2 |   4 |  12 |  18 |  23 |     2 |  23 |        21 |
|---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------|
| 4 | www.mydomain3.com |     |     |  14 |  12 |     |    14 | xxx | NOT FOUND |
|-------------------------------------------------------------------------------|

I'm trying to compare the current state (last cell) to the original cell (first cell with a value).

In column I, I have the formula =IF(G2 = "xxx", "NOT FOUND", IF(H2 = "xxx", "NOT FOUND", H2 - G2))

In column H, I have the formula =IF(F2 = "", "xxx", F2)

In column G, I need to find the first cell with a number. If there isn't one in that range, I need G to be "xxx". I suppose I only need to check for the first cell in the range (B2 to F2) that contains a value, not just a number. I tried using an Index and Match combo, but I couldn't quite understand it.

© Stack Overflow or respective owner

Related posts about excel

Related posts about excel-2007