+ Reply to Thread
Results 1 to 3 of 3

Advice needed for select case macro

  1. #1
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Advice needed for select case macro

    Hello All
    I have a list of data in col A (labelled mileage),as per attached workbook sheet1.I am using a select case macro as shown on sheet 2,to produce the required distance value in col B,eg, If A1 = 1M ,col B1 value = 8.I keep getting a compile error message.I am a complete novice at VBA,and would be gratful if anyone could make this macro work.I would also like to add furthur data to col A in future,would it be possible to add a loop to the macro,which will run until there is nothing in col A.
    Many thanks for help given.
    Attached Files Attached Files
    Last edited by bigband1; 03-05-2012 at 03:44 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Advice needed for select case macro

    The syntax should be

    Please Login or Register  to view this content.
    etc.
    Martin

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Advice needed for select case macro

    hi bigband1, option to make it, please check attachment
    Attached Files Attached Files

+ 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