Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    case is.... (2000 sr 1)

    BIG PROBLEM!!!!!!!!!!!!!!!!!!

    But see this line of macro contain a csea is, well but the case is is valid only if the value is in capital letter or also in minus? if yes, how to controll "SA" or "sa":

    ...........
    CODE = Mid((SourceSheet.Cells(Row, 18)), 1, 2)

    Select Case CODE

    Case Is = "SA"
    TargetSheet.Cells(Row1, 5) = "00"

    ...................

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: case is.... (2000 sr 1)

    Either use:
    CODE = UCase(Mid((SourceSheet.Cells(Row, 18)), 1, 2))

    or use

    Select Case UCase(CODE)

    This will convert the string to uppercase so that "sa" will be equal to "SA" since it will convert to "SA"


    Steve

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: case is.... (2000 sr 1)

    fiiiiiiiiiiiiiiiiiiiiiiii...
    Good code...
    But, for you, wath is the best metod?

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: case is.... (2000 sr 1)

    If you are not going to use the variable CODE later, or would prefer it to be used later in upper case also, I would use the first.

    If you are going to use the variable CODE later and do not want it upper case, I would do it in the Case statement.

    Steve

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: case is.... (2000 sr 1)

    Good exaplain...
    Tks

Posting Permissions

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