+ Reply to Thread
Results 1 to 3 of 3

Macro to Insert Row if Cell is less than and next cell is greater than or equal to

  1. #1
    Registered User
    Join Date
    02-19-2009
    Location
    Wichita, KS
    MS-Off Ver
    Excel 2003
    Posts
    4

    Macro to Insert Row if Cell is less than and next cell is greater than or equal to

    I'm working on a report of orders worked from September 2008 through February 16, 2009. I have the orders sorted by date and time and I need to insert rows between each day and each shift. I wrote a macro to insert a row if the date value of once cell was different from the next cell and so that's take care of. My problem is I can't figure out how to write a macro that will insert a row between first and second shift. I formatted each time to general so it's a decimal. Second shift begins at 14:30 or .604167. There are about 8000 rows of information. I need to write a macro that will insert a row if and only if a cell in column E is less than .604167 and the next cell in column E is greater than or equal to .604167. I just can't get it to work. Can anyone help me?

  2. #2
    Registered User
    Join Date
    02-19-2009
    Location
    Wichita, KS
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Macro to Insert Row if Cell is less than and next cell is greater than or equal t

    Nevermind... I figured it out. Thanks anyway!

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to Insert Row if Cell is less than and next cell is greater than or equal t

    Instead of "figured it out", it is generally courteous practice to post the solution you discovered on your own. The point of the forum isn't just to get an answer, it's to store answers for others to reference.

    Would you mind posting up your solution? Be sure to highlight the code part you are posting and click the # icon so that it presents as code to the rest of us.
    Please Login or Register  to view this content.
    ==========
    Then, if your need is solved, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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