+ Reply to Thread
Results 1 to 6 of 6

Inserting row based on condition

  1. #1
    Registered User
    Join Date
    06-24-2008
    Posts
    23

    Inserting row based on condition

    Hey All,

    I've sifting through some older posts on here and I came across some code that has helped me get a basis for what I'm trying to accomplish.

    Below is the working code but I want to insert a line wherever I encounter a number. I have a range of cells in column "A" with invoices listed and at the end of each customer I have the total. At the total line (the number) I want to insert a line. Right now I can't figure out how get the cell value to recognize a number from a non-number data type (bolded area)

    TIA!

    Please Login or Register  to view this content.
    Last edited by XL2008; 05-04-2009 at 01:03 PM.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Inserting row based on condition

    XL2008,

    Please post your workbook, or a sample of it - scroll down and see "Manage Attachments".
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  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: Inserting row based on condition

    XL2008, be sure to go back and EDIT that first post, click GO ADVANCED (if necessary) and highlight all that code...then click the # icon to wrap the code in [/code] tags. It's a forum requirement and it makes the code readable in native format.

    ========

    Then try this:
    Please Login or Register  to view this content.
    _________________
    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!)

  4. #4
    Registered User
    Join Date
    06-24-2008
    Posts
    23

    Re: Inserting row based on condition

    That works perfect except I realized I didn't account for one thing. I need the inserted row to be the row after the row that has the number condition. Instead it is inserting the blank row before that number condition.

    Thank you again for all your help!

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

    Re: Inserting row based on condition

    How about this little tweak:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-24-2008
    Posts
    23

    Re: Inserting row based on condition

    Thank you again for all your help!

+ 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