+ Reply to Thread
Results 1 to 7 of 7

Macro for copy and paste

  1. #1
    Registered User
    Join Date
    01-27-2007
    Posts
    49

    Macro for copy and paste

    Hey Guys,

    I think this is a fairly easy question but I cant figure it out. Please see attached, this is a pretty simple example, See column A, if i want to put a 1 beside column A as long as a cell is populated in column A how do i do that.
    Is there a simple macro i can use.

    THanks for any help,
    Gav.
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Macro for copy and paste

    Hi,

    Try this?

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    01-27-2007
    Posts
    49

    Re: Macro for copy and paste

    Thanks for the help, that worked great, just one more question if i want it to insert text and not numbers how do i do that. I tried changed it to show text but it is coming out blank

    Please Login or Register  to view this content.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Macro for copy and paste

    Without quotes you're trying to set the cell value to the variable EQ, which is empty. Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-27-2007
    Posts
    49

    Re: Macro for copy and paste

    Awww jesus sorrry i should have know that, completely forgot I needed to wrap test with quotes.

    Thanks a mill man.

  6. #6
    Registered User
    Join Date
    01-27-2007
    Posts
    49

    Re: Macro for copy and paste

    Can i pick your brain one last time i promise, from your code above if i want to put in column B a description that goes for example gavin1 in cell B1, gavin2 in cell b2 and so on and on, till there is a description for every populated cell in column A. So if there is 200 cells populated in A, B should be gavin1 right down to gavin200. is that possible.

    Thanks very much for the above help

  7. #7
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Macro for copy and paste

    Yup, like this:

    Please Login or Register  to view this content.

+ 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