PDA

View Full Version : [SOLVED] Find everything to left of ":"



Ken Puls
05-28-2005, 12:04 AM
Hey guys,

I've been banging my head on this, and it shouldn't be that hard, but somehow... :dunno

In a cell, I could get it with this:


=left(A1,Find(":",A1))

What the heck is the VBA syntax to get this?

Richie(UK)
05-28-2005, 01:10 AM
Hi Ken,

Like this?

MsgBox Left(Range("A1"), InStr(1, Range("A1"), ":", vbTextCompare))

Ken Puls
05-28-2005, 01:13 AM
DOH! :banghead:

Instr! How the heck could I miss that! I was so focussed on Find and Search that it just never even entered my brain!

Thanks!

:beerchug: