+ Reply to Thread
Results 1 to 7 of 7

Filling to the right so I don't have to edit four parts of the formula 350 times!

  1. #1
    Registered User
    Join Date
    01-19-2014
    Location
    Wilkes Barre, United States
    MS-Off Ver
    Excel 2003
    Posts
    12

    Filling to the right so I don't have to edit four parts of the formula 350 times!

    Hello,

    I have this huge formula and I want to run it in one row, across 350 columns:

    =IF(IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(3:3))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(3:3))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(3:3))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(3:3))-10,1)))

    The only thing I need to change from one column to the next is the four places where it says ROW(3:3). I need that to ratchet up as it goes across to the next. The cell to the right should say:

    =IF(IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(4:4))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(4:4))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(4:4))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(4:4))-10,1)))

    Then the next cell to the right should say:

    =IF(IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(5:5))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(5:5))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(5:5))-10,1)),"",INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)),ROW(5:5))-10,1)))

    etc., etc.

    How can I fill across so those go up and I don't have to fill in those four numbers 350 times?!

    Thanks so much.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    What is your exact excel version? Because the formula can be much more sumplified if the version is >2003


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-19-2014
    Location
    Wilkes Barre, United States
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    It is 2007.

    Yeah, can you tell I barely know what I'm doing?!

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    Try this...

    =IFERROR(INDEX('Allocated & Spent'!$G$11:$G$307,SMALL(IF('Allocated & Spent'!$F$11:$F$307="x",ROW('Allocated & Spent'!$G$11:$G$307)-MIN(ROW('Allocated & Spent'!$G$11:$G$307))+1),COLUMN(C:C))),"")

  5. #5
    Registered User
    Join Date
    01-19-2014
    Location
    Wilkes Barre, United States
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    Awesome. Thanks so much!

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    Glad it helps you and thanks for the feedback

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Filling to the right so I don't have to edit four parts of the formula 350 times!

    Quote Originally Posted by Sbselby View Post
    Awesome. Thanks so much!
    But unfortunately you given negative rep to me

+ 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. Using VBA with userform to edit parts of formulas
    By SChapman in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-25-2013, 11:20 AM
  2. Replies: 5
    Last Post: 01-18-2013, 11:21 AM
  3. Replies: 6
    Last Post: 06-14-2012, 12:15 PM
  4. Auto Filling Parts of Formulas
    By ande2428 in forum Excel General
    Replies: 2
    Last Post: 10-13-2010, 10:56 AM
  5. Replies: 3
    Last Post: 03-17-2010, 04:14 PM

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