+ Reply to Thread
Results 1 to 8 of 8

Replacing a Range of Cells in Excel

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    new york,ny
    MS-Off Ver
    Excel 2010
    Posts
    40

    Replacing a Range of Cells in Excel

    Hello Everyone,

    I was wondering if anyone knew how to replace a range of cells in excel with another range of cells for an entire workbook?

    The top range being what I want to replace the Bottom Range with for the entire book

    snapshot of the File is attached and the highlighting is to show the range and is not part of the workbook formatting.

    THANKS!!!!

    1.docx

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,615

    Re: Replacing a Range of Cells in Excel

    To attach a Workbook

    (please do not post pictures of worksheets)

    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-11-2013
    Location
    new york,ny
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Replacing a Range of Cells in Excel

    Here is an updated version of the file so it can be downloaded and worked on
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,615

    Re: Replacing a Range of Cells in Excel

    You need to post a better example. To write a macro we need the actual layout of the sheets: Are those REPLACE rows in rows 1 & two or elsewhere? Column A or...?

  5. #5
    Registered User
    Join Date
    12-11-2013
    Location
    new york,ny
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Replacing a Range of Cells in Excel

    Attached is a few sheets of a massive document. This is how it looks and varies in column and row. The only thing that is consistent is that the first header starts in row 8 but after that nothing else is consistent. A select all sheets function does no good here unforturnately.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,615

    Re: Replacing a Range of Cells in Excel

    Try this one:
    (note that the sheet "header" must be present for this to work)
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Attached Files Attached Files
    Last edited by protonLeah; 12-13-2013 at 07:38 PM.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Replacing a Range of Cells in Excel

    Open the Clipboard and copy the bottom part. Group the worksheets, delete the top part and with the active cell in the upper left corner of the area to be pasted into, click on the item in the Clipboard and paste. The pasted item will then be inserted in the same position on all the grouped worksheets. Right click on a grouped worksheet and Ungroup.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Registered User
    Join Date
    12-11-2013
    Location
    new york,ny
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Replacing a Range of Cells in Excel

    ProtonLeah,

    Thank you so much for working on this for me. I know it took a lot of time and I appreciate it a lot. The code does not work properly copying and pasting so what I have done is just copy the sheets and enter it into your workbook. All the same works great for me thanks again

+ 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. [SOLVED] Help with replacing a numerical range with one value
    By Lechoz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2013, 12:49 AM
  2. Need Help in Replacing Line in Text File With Value Range From Excel (VBA Excel)
    By genoinsider in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2013, 11:00 PM
  3. Replacing range in formula for many cells
    By jimstrongy in forum Excel General
    Replies: 3
    Last Post: 12-21-2011, 03:31 PM
  4. Replies: 2
    Last Post: 01-15-2010, 05:50 PM
  5. Replies: 1
    Last Post: 02-08-2005, 03:06 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