Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default VBA

Hello from Steved
Below runs if I push a macro assigned button.
Question using the below is it possible to type
City and when I use the enter key it will change it to
1-City.
Thankyou.

Sub test1()
Dim x As Long
For x = 1 To Range("a" & Rows.Count).End(xlUp).Row Step 1
Select Case Left(Cells(x, 1).Value, 4)
Case "City "
Cells(x, 1).Value = "1-City"
Case "Rosk"
Cells(x, 1).Value = "2-Rosk"
Case "Papa"
Cells(x, 1).Value = "3-Papa"
End Select
Next x
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"