+ Reply to Thread
Results 1 to 5 of 5

How to fill formula down but skip every nth cell? i.e. leave blank cells between results

  1. #1
    Registered User
    Join Date
    04-09-2012
    Location
    Perth
    MS-Off Ver
    Excel 2007
    Posts
    1

    How to fill formula down but skip every nth cell? i.e. leave blank cells between results

    Hi,

    I have a formula that is referencing a cell in another worksheet. When I drag the formula down I don't want the formula to appear in EVERY
    row...I want it to leave blank cells in between...see following for specifics:

    B5 needs to reference B2 from another worksheet
    B7 needs to reference C2 from another worksheet
    B9 needs to reference B3 from another worksheet
    B11 needs to reference C3 from another worksheet
    B13 needs to reference B4 from another worksheet
    B15 needs to reference C4 from another worksheet

    ...and so on...

    The other worksheet I'm referencing is called: Fixtures DSR

    If I begin by entering the formulae manually like so:

    B5='Fixtures DSR'!B2
    B7='Fixtures DSR'!C2
    B9='Fixtures DSR'!B3
    B11='Fixtures DSR'!C3

    ...and then highlight range B5:12 and drag (copy) down, I get:

    B13='Fixtures DSR'!B10
    B15=='Fixtures DSR'!C10

    What I want is:

    B13='Fixtures DSR'!B4
    B15=='Fixtures DSR'!C4

    I need to drag this down down nearly 400 rows so doing it manually isn't an option.

    Appreciate any advice. Please help!

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: How to fill formula down but skip every nth cell? i.e. leave blank cells between resul

    For the first part, use this (adjust cell addresses to suit your needs):

    =IF(INT(ROW()/2)=ROW()/2,"",INDEX(Sheet2!$B$1:$B$15,ROW()/2))

    The above formula will work so that odd rows display the data. Change INT(ROW()/2)=ROW()/2 for INT(ROW()/2)<>ROW()/2 if you want the even rows to display the data.

    I am really not sure what to do about your second request. It would be along the same lines as what I have above, but where you add in another column that needs to be mixed in, it could get messy. Is there some sort of value you can use to do a lookup?

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: How to fill formula down but skip every nth cell? i.e. leave blank cells between resul

    In B5 dragged down

    =IF(INT((ROW()-3)/2)=(ROW()-3)/2,INDEX(Fixtures!$B$2:$C$32, INT(ROW()-1)/4, ISEVEN(INT(ROW()-3)/2)+1),"")
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    04-01-2012
    Location
    North West, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: How to fill formula down but skip every nth cell? i.e. leave blank cells between resul

    One way, and I do not say it is the best, is to use the INDIRECT function, with two help columns. Once set up, you can then hide these two columns.
    Say you use columns C and D. In D5 enter the following as is, do not use an "=" sign: ''Fixtures DSR'!B Use two single quotes to start with, NOT a double quote.
    In D7 enter 'Fixtures DSR'!C, in the same way, and in C5 and in C7 enter 2.
    In Col C9 enter the following formula: =D5+1 and in C11 enter =D7+1

    In B5 enter =INDIRECT($D$5&C5)
    In B7 enter =INDIRECT($D$7&C7)
    Copy these 2 formulae to B9 and B11
    Now block B5:C12, and drag down as far as you have to.
    Hide Cols C:D, and you're done.
    If you have to drag further down again, remember to block the previous 8 cells, before dragging down again.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to fill formula down but skip every nth cell? i.e. leave blank cells between resul

    This is yet another single formula
    In B5
    Please Login or Register  to view this content.
    [EDIT]
    Another way and a bit shorter
    Please Login or Register  to view this content.

    See this workbook
    Attached Files Attached Files
    Last edited by Marcol; 04-09-2012 at 01:11 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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