+ Reply to Thread
Results 1 to 3 of 3

Copying and pasting over several Cells via VBA

  1. #1
    Registered User
    Join Date
    05-27-2013
    Location
    BEDS
    MS-Off Ver
    Excel 2003
    Posts
    44

    Copying and pasting over several Cells via VBA

    Hi all,

    I am new to VBA and have been looking at the tutorials on here which has been great. I am still very novice so sorry if this is a very simple basic question.

    Here is a bit of background of my issue
    I currently have formulated text over several cells based on decisions users make in other field. I originally had all the text within 1 cell, but realised when this copies and pastes into a notepad or to an article, it comes out as 1 complete sentence and not paragraphs. It was easier to put these into their own seperate cells and use VBA to copy and paste. Example:

    A1 - Part 1 of sentence
    A2 - Blank
    A3 - Part 2 of sentence
    A4 - Blank
    A5 - Part 3 of sentence
    etc...

    The reason I done it this way as well was when I placed it underneath each other (A1, A2 both having sentences) - They didn't have the correct character spacing.
    I've also noticed, by doing it the way I have done in the above I get the table type look when I copy this into word which is not what I require.

    My Issue
    What I am trying to do is be able to copy the cell is A1 and apply bold character around it.
    Have a spacing in between (char10 or char13) and then copy A3, copy A5.

    The user can then paste all of this into the article they require... Currently being new, I do not quite understand how to do that...
    I am thinking it is to put these each in their own memory and then retrieve all of this to copy?

    Is there any guidance on if this is possible? Can anyone provide any tips on either how to write this or point me to a tutorial (if you know any of what I am trying to achieve) - I feel I know how to go about copying each cell and doing what is required.. but I don't know how to group up all that I have copied to paste in whatever I chose to do to each particular cell when I initially copied.

    I hope the above makes sense

  2. #2
    Registered User
    Join Date
    05-27-2013
    Location
    BEDS
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Copying and pasting over several Cells via VBA

    Update

    So I didn't use the best common sense in recording the information.... and have worked out part 1... To place a cell into bold and then copy the cell range...

    When I paste it into a word format, it's like it puts it into a table format...

    What is the best way to remove the table format for each cell... I need it have a paragraph line for each cell the information sits in.

    This is the "basic" VBA code I recorded and does part of what I need.

    Please Login or Register  to view this content.
    Last edited by alansidman; 11-05-2017 at 03:57 PM. Reason: Code Tags Added. Please re-read forum rules

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,861

    Re: Copying and pasting over several Cells via VBA

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Copying and Pasting Merged Cells in VBA
    By norseman1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2016, 01:38 PM
  2. Replies: 0
    Last Post: 05-15-2013, 03:22 AM
  3. Copying & pasting visible cells only
    By Enewbee in forum Excel General
    Replies: 2
    Last Post: 07-20-2012, 02:05 AM
  4. Copying and Pasting Cells
    By JoshF in forum Excel General
    Replies: 3
    Last Post: 01-04-2012, 08:38 PM
  5. Copying and pasting cells with formulas
    By jonvanwyk in forum Excel General
    Replies: 2
    Last Post: 07-01-2010, 12:37 PM
  6. copying/pasting cells not working
    By Lpayne in forum Excel General
    Replies: 1
    Last Post: 06-26-2008, 03:26 PM
  7. Copying and pasting a series of cells
    By MattBeckwith in forum Excel General
    Replies: 3
    Last Post: 02-12-2006, 11:10 PM

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