I wanted to search for a space in some text and used SEARCH, but if no space is found I get an error. So I used something like this
“=IF(ISNUMBER(SEARCH(” “,F2,1)),TRUE,FALSE)”. If it is TRUE I can put the SEARCH in that part of the formula and I will get the position of the space and if it is false I can simply put in a zero.
“=IF(ISNUMBER(SEARCH(” “,F2,1)),SEARCH(” “,F2,1),0)”
This seems real klutzy. Is there another command I can use or a better way to do this?
Why? I am attempting to clean up someone’s database with names in one field. The person uses spaces to move the text to the right, away from the left border of the cell, instead of an indent and uses a comma and two spaces (generally) between the last and first name and then some spaces (generally one) between the first name and the maiden name and then somewhere down the line puts in a spouse in parentheses.
Johnson, Jennifer Wilson (Robert)
He also used a fancy script font so one cannot tell where there are spaces or how many. Not nearly as clean as the line above.