![]() |
#1
|
|||
|
|||
![]()
Dear Sir/Madam
if apple, orange ,banana in column a then column c will show as file apple=1 orange=2 banana=3 but the follow programme don't work, how to do Code:
Sub group() For i = 1 To 6 If Range("a" & i).Value = apple Then Range("C" & i).Value = 1 End If Next i For i = 1 To 6 If Range("a" & i).Value = orange Then Range("C" & i).Value = 2 End If Next i For i = 1 To 6 If Range("a" & i).Value = banana Then Range("C" & i).Value = 3 End If Next i End Sub Tom Last edited by macropod; 05-20-2013 at 04:38 PM. Reason: Added code tags & formatting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Triscia | Word Tables | 1 | 01-15-2013 07:39 AM |
![]() |
vthomeschoolmom | Excel | 1 | 04-18-2012 02:29 PM |
divide page into 4 parts | aclark17 | Word | 4 | 01-17-2012 09:04 AM |
Divide by zero error | doublejoy | Excel | 1 | 08-22-2009 03:10 AM |