Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
LEFT Function in Macro
If I have a specific cell say on Sheet1!B8 that I want to
go to and use the left function on, in VB coding how do I do this? What I have is the user picks a Vendor number - Name item from ComboBox3 and it inserts into cell Sheet1!B8 but then once inserted I want to remove the text leaving only the numbers. Eg. In List: 1000 - Company Name Result desired: 1000 It is always 4 digits, a space, a dash, a space, then a name, so the length is always 4. So I had the macro go to the cell via: Application.Goto Reference:=Worksheets("Sheet1").Range ("B8") Which goes correctly and selects the cell, but how to I then say - with the current contents remove all but the 4 left most characters? Sorry, I am new at VB. Thanks! SHauna |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to nest a left function within a sumif function? | Excel Worksheet Functions | |||
macro to sort right to left | Excel Discussion (Misc queries) | |||
LEFT function-all to left of a comma? | Excel Worksheet Functions | |||
Left vs Left$ function | Excel Discussion (Misc queries) | |||
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION | Excel Worksheet Functions |