+ Reply to Thread
Results 1 to 4 of 4

Adding in two blank rows using 2 If values (straightforward, I think....)

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    work
    MS-Off Ver
    Excel 2003
    Posts
    2

    Adding in two blank rows using 2 If values (straightforward, I think....)

    Hey all.

    Been searching around this forum and others for hours to try and fix a little formula, but as it's my first day ever looking at them I'm a bit confused.

    I got this formula from another thread

    Please Login or Register  to view this content.
    which is basically bang on except I want to add another If condition and change it from pasting in one row to two. I want to have the macro such that if, for example, the company name or the currency type changes, then two rows are added below it. So to turn it from this:

    Heading 1 Heading 2
    Company 1 USD
    Company 1 USD
    Company 1 GBP
    Company 2 USD
    Company 2 CAD
    Company 2 EUR

    to this

    Heading 1 Heading 2
    Company 1 USD
    Company 1 USD


    Company 1 GBP


    Company 2 USD


    Company 2 CAD


    Company 2 EUR

    Make sense? I appreciate the help!

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Adding in two blank rows using 2 If values (straightforward, I think....)

    Hey JerryWork,

    does this work for you?
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Adding in two blank rows using 2 If values (straightforward, I think....)

    Hello JerryWork
    With acknowlegements to RHCPgergo, looks like I picked this up at the same time.
    I'll post it because there are a couple of slight differences that may be of interest.
    1. There is a variable rws that you can set to determine the number of blank rows to insert - may be useful
    2. Assumes that Company i/d and the Currency are in separate columns A and B

    Please Login or Register  to view this content.
    Last edited by barryleajo; 01-28-2013 at 03:18 PM. Reason: fix typo
    If this was helpful then please click the small star icon at the bottom left of my post. A little appreciation goes a long way.

  4. #4
    Registered User
    Join Date
    01-28-2013
    Location
    work
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Adding in two blank rows using 2 If values (straightforward, I think....)

    Hey guys.

    Thanks a million for the super-quick responses. Barry, yours works flawlessly, and that's the one I'll use. It's awesome. I meant to mention that the there were in fact two columns as you say.

    Special thanks to you too RHCPgergo . I appreciate the effort involved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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