+ Reply to Thread
Results 1 to 2 of 2

Macro to locate certain cells and change data/add rows

  1. #1
    Registered User
    Join Date
    02-09-2017
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    1

    Macro to locate certain cells and change data/add rows

    Hi everyone,

    I'm new to the whole vba side of excel and have been struggling to piece together and adjust bits of code I've found online, so I'd appreciate any help I can get on here.

    Basically, I need to update hundreds of forms to a new template. I've been successful in recording a simple macro to make adjustments to formatting and changing text, as the new template is quite similar to the old up to a certain point. However, I need to change the last 3 rows to conform to the new template (see below).

    equipment form rev2.PNG

    ...needs to be updated to...

    equipment form rev3.PNG

    (ignore the Y's and N's in the first attachment as they will need to be entered manually for each form.)

    I was thinking of a script that could find the cells based on the information the cell contained. Maybe it would be easier to use the fact that these 3 rows will always be the last 3 rows of the form, for every form?

    Thank you so much for your time.

  2. #2
    Forum Contributor
    Join Date
    09-16-2015
    Location
    United States
    MS-Off Ver
    2010
    Posts
    100

    Re: Macro to locate certain cells and change data/add rows

    To get you started take a look at this.

    It will not solve your issue as it is, because you will need to modify it for your own needs, however the basic principles are there.

    Please Login or Register  to view this content.
    What we have above is a specified column and a set range or rows. The code will look through ever row and insert a new row between each in the range specified. After the row is created it will then change that value to the specified value (ie. "This is the new data").

    In this code we are using a loop, which can be read up on here.

    For quick little codes to see how excel works I would also recommend to try and record macros to see processes. Recording a macro will allow you to also learn new methods of doing things.

+ 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] Change Macro that moves formula down 5 cells when rows are copied
    By Jamidd1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2016, 07:06 AM
  2. macro to locate locate text string and copy/paste offset range
    By guystanley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2014, 08:46 PM
  3. [SOLVED] Developing a macro to locate a keyword, delete that row and all rows below
    By Student1990 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 03:00 PM
  4. Macro to change cells reference addres (+35 in rows, +2 in columns)
    By Shishek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2013, 11:29 AM
  5. Macro to locate and go to specific data
    By sandbach in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-09-2011, 09:56 AM
  6. [SOLVED] Macro to add rows at a change in data
    By Mr. T. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2006, 10:30 AM
  7. Locate duplicate data in rows then sort
    By Racorfrank in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-03-2005, 11:21 AM

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