Aladin or HotPepper, if you guys come along and can spare a moment and can explain how this works... I am tying this into the last formula explanation.
I just cannot seem to get my head around how to go about thinking about this correctly to get to understand it.
IMHO, there is an easier way, but are you really wanting just formulas?
Public Function lastspaceright(str As String) As String
Dim i As Long
Dim j As Long
i = 1
j = 1
j = InStr(j, str, " ", vbBinaryCompare)
If j <= 0 Then
i = j
j = j + 1
lastspaceright = Right(str, Len(str) - i)
Note: Insert a module and place this function in it.
Cell A1 value = "This is what it does"
Cell B1 value = "=lastspaceright(a1)"
Cell C1 Value = "len(b1)"
A1 = "This is what it does"
B1 = "does"
C1 = "4"
Will this work? Or do you still want an explanation of the above minboggling formula?
I think one of my basic questions is, what question do you ask to properly formulate the logic for the formula, e.g., I want the last values after the last space.
How do you think about that to get the right formula functions and in the right order.
For instance, in this one:
=TRIM(RIGHT(" "&Y7,LEN(" "&Y7)-SEARCH("#",SUBSTITUTE(" "&Y7," ","#",LEN(" "&Y7)-LEN(SUBSTITUTE(" "&Y7," ",""))))))
Would I build this in pieces or do I need to know how to build it right off?