+ Reply to Thread
Results 1 to 5 of 5

Macro code required: if cell = S*(wildcard) then copy from one cell to another

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    New South Wales, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Macro code required: if cell = S*(wildcard) then copy from one cell to another

    Hi all.

    I've only just started learning about macros so I'm not overly sure on the language used at this stage; you have to start somewhere right?! Anyway I have an exported document that spits out a info like the following

    A B C D

    Site : S01


    Point #
    1 1
    2 2
    3 3

    Total 6


    What I need my macro to do is move the data from one cell - "S01" to the cell before the range of point numbers (ie the 1, 2 and 3 - the number of points varies as well).
    Speed of the marco isn't a factor and I have some row deletes which will fix over run so I'm thinking I set the copy for a range of the maximum points in any site possible then delete the unused afterwards. Crude I know but it will suffice for what I need.
    Also, as an extension to this question, the site name varies from s1 to s01 to s403 etc so is it possible to have code that is able to register the # after the S using a wildcard or something? Unsure on this point.

    Any help on this would be great!

    Cheers

    Linc
    Last edited by 11linc11; 04-13-2013 at 10:47 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro code required: if cell = S*(wildcard) then copy from one cell to another

    can you attach a sample file for testing with initial data and desired result?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    01-17-2013
    Location
    New South Wales, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Macro code required: if cell = S*(wildcard) then copy from one cell to another

    My appologies, I should have copied it in from the start.

    Example_Data.xlsm

    I have a few extra comments in text boxes in that. I really haven't made any progress from code in other forum posts. I don't know enough about the language yet.

    Cheers

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro code required: if cell = S*(wildcard) then copy from one cell to another

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-17-2013
    Location
    New South Wales, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Macro code required: if cell = S*(wildcard) then copy from one cell to another

    That is fantastic. Thank you so much for that.

    Now I just have to figure out how it works. Again, thankyou for that. Do you happen to know of a document which explains a bit of the basic coding language for beginners?

    Cheers

    Linc

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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