+ Reply to Thread
Results 1 to 5 of 5

Select Case problem

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Select Case problem

    Hello

    I am working on a problem where I have to search the string in column B and if it contains a value say "C21" I want column C to input "Century 21" Here is the code I have so far below. Its not adding the values to column C for me any thoughs on this?

    Please Login or Register  to view this content.
    Moderators Note: Please follow forum rules and use code tags. Added for you this time, but please use them in the future…Thanks.
    Last edited by jeffreybrown; 12-27-2012 at 04:43 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Select Case problem

    Hello Darthzo,

    You are already searching for the strings that match what you are looking for. The Select Case statement is superfluous. The code below will fill in the column "C".
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Select Case problem

    Could you explain how the .text works in your syntax above please

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Select Case problem

    Hello Darthzo,

    The .Text is a Range object Property that returns the .Value as a Text String, regardless of what the value is.

  5. #5
    Registered User
    Join Date
    09-20-2012
    Location
    New york
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Select Case problem

    Thank you so much Leith!

+ Reply to Thread

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