+ Reply to Thread
Results 1 to 7 of 7

Using Select Case

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Using Select Case

    Greetings,
    I am needing to transfer cell information from one worksheet to multiple worksheets. The information will need to be entered by use of "Select Case". Using the following code, the Select Case is only referencing the first cell and not the others. Because I have several cells to refence, I would like to minimize the mount of code.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Using Select Case

    Try it like this:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Using Select Case

    Mr. Deitrick,
    Works perfect!!! Thank you much!!!

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Using Select Case

    I didn't really pay attention to your actual entries - you may want to enter numbers into your cells rather than strings:

    Please Login or Register  to view this content.
    become


    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Using Select Case

    It actually works using the "". What is the difference between numbers and strings?

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Using Select Case

    If you use MATCH or other functions like VLOOKUP that perform a match, numbers and strings don't actually match. And math sometimes works (multiplication) and sometimes doesn't (SUM). In general, if you want a number, use a number.

  7. #7
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Using Select Case

    Makes sense - thanks for clarifying!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Select case inside a select case
    By KarelMusa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2019, 07:10 PM
  2. [SOLVED] Select Case with multiple lines in a case statement?
    By jGKpZ8a33sPrnqX8fam7 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2017, 10:25 AM
  3. [SOLVED] Need the proper syntax to use Case/Select Case in vba properly.
    By rbion in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-16-2013, 02:34 PM
  4. [SOLVED] Disregard case in VBA code. (UCase, LCase, Select Case)
    By Orestees in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-07-2012, 12:12 PM
  5. Case Select compile error "Case without case select"
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2012, 06:50 AM
  6. Case Select....The alternative method for long "Select Case"
    By kimyap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2008, 01:24 AM
  7. Select case / case is, multiple arguments
    By Werner Rohrmoser in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2006, 07:00 AM

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