Pregunta

This formula works on some of of my cells and not others, I've checked to see if the formatting was different but could find nothing.

I have for instance

a Cell that says "Dell Computers 12150 sandy dr portland or 97229"

What I want is just to get "Dell Computers" by itself.

I've tried a few things, the most obvious for mew as to:

=LEFT(A1,FIND({1,2,3,4,5,6,7,8,9,0},A1,1)-2)

This works for some, for others it doesn't (for some for instance the above if there are two 1's in the address it gives me "Dell Computers 1", taking the second 1 as being the value)

Maybe a newb question, but what am I doing?

¿Fue útil?

Solución

use this function and set cell value to

=udfRegEx(A1,"^\D+")

Otros consejos

Also, do take a look at this old thread. I haven't quite parsed how that formula works; but this formula

=LEFT(A2, MIN(FIND({1,2,3,4,5,6,7,8,9,0}, A2 & "1234567890"))-1)

Works for

  • Dell Computers 12150 sandy dr portland or 97229
  • Dell Computers 250 sandy dr portland or 97229
  • Dell Computers sandy dr portland or 97229
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top