Read first two characters

Closed
torpe - Feb 16, 2012 at 11:00 PM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Feb 18, 2012 at 10:41 PM
Hello,

I am new at VB and cannot complete a macro so your help will be appreciated.

If I have this data on a worksheet:

A B C
Tue 03Jan12 UC-1201 LA N763CX

Tue 03Jan12 UC-1202 LA N763CX

Tue 03Jan12 UC-1203 LA N763CX

Tue 03Jan12 UC-1204 LA N763CX


Reading file by file I wan to read column B, and if the cell in column B starts by "UC" then copy certain data on a diferent worksheet.

It should be easy but i cannot do it



Related:

1 reply

venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 810
Feb 18, 2012 at 10:41 PM
in the macro (something like this )

if left(range("B1"),2)="UC" then
(other code statements)


end if 
0