JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,531
- Office Version
- 365
- Platform
- Windows
I need to write a UDF to convert a general string expression for feet and inches into two real numbers (feet and inches).
The possible string inputs can be:
Is there a better way than a bunch of nested IF statements where I scan for the various units and split the string accordingly?
I do want to flag any invalid expressions.
The possible string inputs can be:
- 3' 4.5"
- 3 ft 4.5 in
- 3ft 4.5in
- 42.1"
- 42.1 in
- 42.1in
- 3.5'
- 3.5 ft
- 3.5ft
Is there a better way than a bunch of nested IF statements where I scan for the various units and split the string accordingly?
I do want to flag any invalid expressions.