Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Does anyone have any suggestions to look at column A and: In column A: If Cell.Value = "005" Then Colum B Cell Value="AAA" In column A: If Cell.Value = "102" Then Colum B Cell Value="BBB" In column A: If Cell.Value = "109" Then Colum B Cell Value="CCC" In column A: If Cell.Value = "112" Then Colum B Cell Value="DDD" In column A: If Cell.Value = "641" Then Colum B Cell Value="EEE" In column A: If Cell.Value = "2090" Then Colum B Cell Value="FFF" Any help would be greatly appreciated! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=511966 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Private Sub Worksheet_Change(ByVal Target As Range) Dim NewValue As String If Target.Column = 1 Then Select Case Target.Text Case Is = "005", "5" NewValue = "AAA" Case Is = "102" NewValue = "BBB" Case Is = "109" NewValue = "CCC" Case Is = "112" NewValue = "DDD" Case Is = "641" NewValue = "EEE" Case Is = "2090" NewValue = "FFF" End Select Target.Offset(0, 1) = NewValue End If End Sub This assumes that you want the Triple letters to occurr right next to your exixting numbers. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Mark, I appreciate your help! I receive the following error messsage: Run Time Error 424 - Object required At this line: If Target.Column = 1 Then Any sugestions? Thank -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=51196 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() STEVEB Wrote: Thanks Mark, I appreciate your help! I receive the following error messsage: Run Time Error 424 - Object required At this line: If Target.Column = 1 Then Any sugestions? Thanks Mark's routine seems to be OK. Just check that you have copied i correctly. Also I hope the procedure is on the code sheet of you worksheet. ( Rightclick the worksheet tab and then click 'view code' Paste the procedure given by Mark on this code sheet.) It should work. A V Veerka -- avveerka ----------------------------------------------------------------------- avveerkar's Profile: http://www.excelforum.com/member.php...fo&userid=3033 View this thread: http://www.excelforum.com/showthread.php?threadid=51196 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() STEVEB Wrote: Does anyone have any suggestions to look at column A and: In column A: If Cell.Value = "005" Then Colum B Cell Value="AAA" In column A: If Cell.Value = "102" Then Colum B Cell Value="BBB" In column A: If Cell.Value = "109" Then Colum B Cell Value="CCC" In column A: If Cell.Value = "112" Then Colum B Cell Value="DDD" In column A: If Cell.Value = "641" Then Colum B Cell Value="EEE" In column A: If Cell.Value = "2090" Then Colum B Cell Value="FFF" Any help would be greatly appreciated! Instead of VBA you could have a nested IF formula in B1 =IF(A1="005","AAA",IF(A1="102","BBB",IF(A1="109"," CCC",IF(A1="112","DDD",IF(A1="641","EEE",IF(A1="20 90","FFF","")))))) And then autofill to all the cells (B2 onward) in col B. I am assuming that col A has text characters not numbers. eg if A1 ="102" then B1 = "BBB" asssumes A1 is character string. If it is number then change formula by removing quotes around A1 value. eg A1=102 instead of A1="102" A V Veerkar -- avveerkar ------------------------------------------------------------------------ avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338 View this thread: http://www.excelforum.com/showthread...hreadid=511966 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A V Thanks for the suggestion..It worked!! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=511966 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() STEVEB Wrote: A V Thanks for the suggestion..It worked!! You are welcome. A V Veerka -- avveerka ----------------------------------------------------------------------- avveerkar's Profile: http://www.excelforum.com/member.php...fo&userid=3033 View this thread: http://www.excelforum.com/showthread.php?threadid=51196 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
SUMIF statement with AND statement | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |