Thanks for your suggestion Mike. The format the data imports as is 'general'.
I have tried changing the data to text format - post import, but the code
still would not recognize the alphanumeric number.
A VB developer friend of mine said that the data being imported contained
trailing spaces (invisible to the user) that was causing the code not to
recognize the data.
PS - is there a way to include both right 'and' left parts of the string?
--
Me! cypher
"Mike Fogleman" wrote:
> Your code works fine on my sheet. What is the cell format for the cells in
> your code?
>
> Mike F
> "cypher" <(E-Mail Removed)> wrote in message
> news:78198D92-842A-487A-8BFD-(E-Mail Removed)...
> > Can anyone tell me how to change the value of a cell in say column "B"
> > based
> > on the value in a cell in column "A" when the value in column "A" is
> > alphanumeric? I am already able to make this code work when the value in
> > column "A" is numeric only, but the code does not have any affect when the
> > value in "A" is alphanumeric.
> >
> > Here is the code I am using:
> >
> > Sub test()
> > For i = 1 To Cells(Rows.Count, "C").End(xlUp).Row
> >
> > If Cells(i, "a").Value = "dfg260" Then
> >
> > Cells(i, "d").Value = "48"
> >
> > End If
> > Next i
> > End Sub
> >
> > thanks
> > --
> > Me! cypher
>
>
>
|