jeffrey.demulling at usbank.com
jeffrey.demulling at usbank.com
Tue May 18 14:01:48 CDT 2004
Try this: If Left(ActiveCell.Value, 2) = "XX" Then Activecell.offset(0,1).select 'same cell coumn B = "XXXX" Activecell.value = "XXXX" Activecell.offset(0,-1) ElseIf Left(ActiveCell.Value, 2) = "YY" Then Activecell.offset(0,1).select 'same cell coumn B = "YYYY" Activecell.value = "YYYY" Activecell.offset(0,-1) End If Oleg_123 at xuppa.com Sent by: To: accessd at databaseadvisors.com accessd-bounces at databasea cc: dvisors.com Subject: [AccessD] (OT) Excel VBA question 05/18/2004 01:56 PM Please respond to "Access Developers discussion and problem solving" sorry for posting excel question, does anyone know how i can fix this so it would post required strings in Column B for the same row ? Oleg Sub CheckFirst4chars() Dim First4 As String Range("A1").EntireRow.Select Do While ActiveCell.Value <> " " If Left(ActiveCell.Value, 2) = "XX" Then 'same cell coumn B = "XXXX" ElseIf Left(ActiveCell.Value, 2) = "YY" Then 'same cell coumn B = "YYYY" End If Loop End Sub ----------------------------------------- Get the BUZZ on your Friends, Relatives and Celebrities: www.xuppa.com/buzz/?link=webmail -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com