+ Reply to Thread
Results 1 to 4 of 4

Insert Row Based on Cell Value and Mod Function Help

  1. #1
    Forum Contributor
    Join Date
    12-09-2015
    Location
    Virginia, USA
    MS-Off Ver
    2007
    Posts
    123

    Insert Row Based on Cell Value and Mod Function Help

    Hello,

    I am trying to create a macro that will bump data into another column/page if the data in the row ="Header" and if the "Header" tag falls on rows 61, 121, 181, etc.

    I feel like I am on the right track with the formula I need to use, but just having a hard time getting past some errors.


    When I use the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    , this returns "0" at all the places I would like to insert an additional row. Therefore I tried the following, but getting "Expected an Expression" error.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Insert Row Based on Cell Value and Mod Function Help

    Take a look at the syntax of the Mod operator.

    Artik

  3. #3
    Forum Contributor
    Join Date
    12-09-2015
    Location
    Virginia, USA
    MS-Off Ver
    2007
    Posts
    123

    Re: Insert Row Based on Cell Value and Mod Function Help

    Ok, is Mod in VBA different than mod in Excel? Sorry, I'm still learning VBA so that may be a dumb question. It appears that both give the remainder, but I just don't get how I would tell the loop function that if the Current Row is divisible by 60 AND the current cell begins with ";;Result" then add a blank row. Otherwise move to the next row.

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Insert Row Based on Cell Value and Mod Function Help

    Try
    Please Login or Register  to view this content.
    Artik

+ 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. Replies: 5
    Last Post: 07-28-2022, 05:12 AM
  2. Insert of a function in an Cell with VBA
    By thomaswolf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2021, 03:00 AM
  3. [SOLVED] Event Macro to insert text in cell based on input of another cell
    By nplouffe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2012, 11:54 AM
  4. After insert new record, insert values in row based on first cell in row
    By frankienap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2012, 11:36 AM
  5. how to insert IF function into cell?
    By Shockaido in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-10-2010, 11:12 AM
  6. [SOLVED] Creating function to insert data based on criteria
    By Tami in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2006, 05:45 PM
  7. [SOLVED] how do I insert a row based on a function result
    By chris in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2005, 08:09 PM

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