Results 1 to 6 of 6

select case macro error debug

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-11-2008
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    242

    select case macro error debug

    Hi,
    I have this code which is not running the possible reason which can be is contents of column 'S' has two spaces after which I am not able to remove,pl advice
    Sub replc()
        Dim i As Long
        For i = 2 To Range("S" & Rows.Count).End(xlUp).Row Step 1
            Select Case UCase(Range("S" & i).Value)
                Case "BT"
                    Range("T" & i).Value = "BTS"
                Case "MW"
                    Range("T" & i).Value = "Minilink / Access Link"
                Case "BS"
                    Range("T" & i).Value = "BSC"
                Case "IN"
                    Range("T" & i).Value = "IN"
                Case "TE", "TS"
                    Range("T" & i).Value = "Transmission"
                Case "NM"
                    Range("T" & i).Value = "OSS"
                Case "SE"
                    Range("T" & i).Value = "Services"
                Case "AN"
                    Range("T" & i).Value = "GSM antenna"
                Case "NL", "OF"
                    Range("T" & i).Value = "NLD-OFC"
                Case "MP"
                    Range("T" & i).Value = "MPBN"
                Case "VA"
                    Range("T" & i).Value = "VAS"
                Case "TW", "ST", "DG", "TF", "IF", "PP", "BA", "AC", "IN", "SH", "PS", "UP", "BA", "AC"
                    Range("T" & i).Value = "Civil & Infra"
                Case "NW", "GP"
                    Range("T" & i).Value = "VAS"
                Case Else
                    ' Don't change anything
            End Select
        Next i
    End Sub
    Attached Files Attached Files
    Last edited by arnab0711; 01-29-2011 at 02:16 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1