+ Reply to Thread
Results 1 to 5 of 5

Macro to cut one figure from a cell

  1. #1
    Registered User
    Join Date
    04-20-2014
    Location
    Cairns
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to cut one figure from a cell

    Hi and thanx in advance.
    I am new to this and this is probably a stupid question....

    I have a list of addresses...... in on column
    A
    21 Brook St
    21 Buck St
    21 Bucker St

    I want to cut the 21's and paste them to a new columm/cell so it looks like this

    A B
    21 Brook St
    21 Buck St
    21 Bucker St

    when I make a macro it changes the numbers but all the street change to Brook St....

    A B
    21 Brook St
    21 Brook St
    21 Brook St

    Does anyone have a link to a video I can watch or know what I am doing wrong.....
    Thanks....

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to cut one figure from a cell

    Hi Shanein,

    Welcome to the forum - can you post the code you've developed? (Be sure to highlight it and click on the #).
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    04-20-2014
    Location
    Cairns
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to cut one figure from a cell

    I haven't written a code..... just recorded it.... sorry I am a newbie.... cant seem to view the code in vbasic..

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Macro to cut one figure from a cell

    Hi and welcome to the forum

    There are a few ways to do this without using VBA.

    1 would be to use Text2Columns - Fixed Width, and remove all devisions you dont wat.
    an alternative would be to use a helper column with a formula to extract the value...
    =left(A1,find(" ",A1,1)-1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to cut one figure from a cell

    Hi Shanein,

    With Excel prominent, Alt + F8 will show you the macros that you have and then you need only highlight the macro name and choose Edit in order to see it

    And - thanks for the rep!

    Here's some simple code:

    Please Login or Register  to view this content.
    Last edited by xladept; 04-20-2014 at 09:40 PM.

+ 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. Replies: 4
    Last Post: 02-03-2014, 08:05 AM
  2. Replies: 1
    Last Post: 02-18-2013, 06:09 AM
  3. Sum formula to exclude monthly budget figure when actual figure is entered
    By rocketmail in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2013, 04:22 AM
  4. Run Macro on cell update in range (Cant figure it out)
    By ofirio in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2012, 02:00 PM
  5. Calculating monthly sales figure required to make annual turnover figure
    By CatIsoSio Sky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2010, 04:42 PM

Tags for this Thread

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