Question: At work we currently use a program that outputs product number combinations in a single cell. For example, in cell C2 there will be "1 4 6" to show the customer ordered products 1, 4 and 6. These numbers are separated by a single space. Is there any if() type formula I could use that would detect if the products were out of order like "1 6 4". I do not want to use the text to column conversion as I want to keep it all in one step. 

Thanks!!

Answer: 
Offtopic-start

This is weird. About 1 hour ago I was [checking this question](https://stackoverflow.com/questions/48767395/how-to-find-coefficients-of-exponential-formula-from-given-pairs-of-numbers), thus I have decided to mimic the input and see what happens. In order to mimic the input, I have built probably what you need:

Offtopic-end

---

```
Option Explicit

Public Sub SplitSingleColumnToCells()

    Dim rngInput    As Range
    Dim rngOutput   As Range
    Dim myCell      As Range

    'Set manually, it is faster :)
    Set rngInput = Range("A1:A22")

    For Each myCell In rngInput
        'replace multiple space with single space:
        myCell = Replace(myCell, Chr(32), Chr(32))
        Dim inputArray As Variant
        inputArray = Split(myCell)

        Dim col     As Long
        Dim i       As Long
        col = 0
        For i = LBound(inputArray) To UBound(inputArray)
            If Len(inputArray(i)) > 0 Then
                col = col + 1
                myCell.Offset(0, col) = inputArray(i)
            End If
        Next i
        'Probably not needed:
        'myCell.Clear
    Next myCell
End Sub

```

Simply check the `rngInput` and adjust it correctly. It would give you the values in the next columns. Plus, it works if the split is with more than one empty space.

Thus, if this is the input:

[![enter image description here](https://i.stack.imgur.com/yH4Cz.png)](https://i.stack.imgur.com/yH4Cz.png)

This is the output:

[![enter image description here](https://i.stack.imgur.com/I9ir6.png)](https://i.stack.imgur.com/I9ir6.png)
Following is IF based formula built using LOOKUP (same as what imaginaryhuman said)

Source cell containing data like `1 4 6` is assumed to be A2. Not tested heavily.

`=IF(LOOKUP(9E+307,-((MID(SUBSTITUTE(" "&A2," ",REPT(" ",99)),ROW($A$1:INDEX(A:A,(LEN(A2)-LEN(SUBSTITUTE(A2," ","")))+1))*99,99)+0)-(MID(SUBSTITUTE(" 0 "&A2," ",REPT(" ",99)),ROW($A$1:INDEX(A:A,(LEN(A2)-LEN(SUBSTITUTE(A2," ","")))+1))*99,99)+0)))>0,"Out of sequence","In sequence")`