+ Reply to Thread
Results 1 to 10 of 10

Advanced formula filling Urgent

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    17

    Exclamation Advanced formula filling Urgent

    Hi!

    I need to get this done for work and i can't seem to find how to do it.

    In sheet 1:

    c8: =IF(AND(C$3>='Sheet 2'!$N5;C$3<='Sheet 2'!$O5;'Sheet 2'!$N7=$C$1);1;0)
    c9: =IF(AND(C$3>='Sheet 2'!$N10;C$3<='Sheet 2'!$O10;'Sheet 2'!$N12=$C$1);1;0)
    c10: =IF(AND(C$3>='Sheet 2'!$N15;C$3<='Sheet 2'!$O15;'Sheet 2'!$N17=$C$1);1;0)

    I want to be able to drag down this formula to c200 following this pattern creating

    c11: =IF(AND(C$3>='Sheet 2'!$N20;C$3<='Sheet 2'!$O20;'Sheet 2'!$N22=$C$1);1;0)
    c12: =IF(AND(C$3>='Sheet 2'!$N25;C$3<='Sheet 2'!$O25;'Sheet 2'!$N27=$C$1);1;0)

    Is it possible to drag down a pattern like this?

    Please help!
    Last edited by roligankan; 08-13-2013 at 05:20 AM. Reason: fixed typo

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced formula filling Urgent

    c12: =IF(AND(C$3>='Sheet 2'!$N20;C$3<='Sheet 2'!$O20;'Sheet 2'!$N27=$C$1);1;0) ???????
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Advanced formula filling Urgent

    Oh I mean ofcourse:
    c12: =IF(AND(C$3>='Sheet 2'!$N25;C$3<='Sheet 2'!$O25;'Sheet 2'!$N27=$C$1);1;0)

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Advanced formula filling Urgent

    Hi,

    Try this in C8 and copy down as required:

    =IF(AND(C$3>=INDIRECT("Sheet2!$N"&ROWS($1:1)*5),C$3<=INDIRECT("Sheet2!$O"&ROWS($1:1)*5),INDIRECT("Sheet2!$N"&2+(ROWS($1:1)*5))=$C$1),1,0)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced formula filling Urgent

    try
    =IF(AND(C$3>=INDEX(Sheet2!$N:$N;ROWS($A$1:A1)*5);INDEX(Sheet2!$N:$N;ROWS($A$1:A1)*5+2)=$C$1);1;0)

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced formula filling Urgent

    oops missed a bit
    try
    =IF(AND(C$3>=INDEX('Sheet2'!$N:$N;ROWS($A$1:A1)*5);C$3<=INDEX('Sheet2'!$O:$O;ROWS($A$1:A1)*5);INDEX('Sheet2'!$N:$N;ROWS($A$1:A1)*5+2)=$C$1);1;0)'

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Advanced formula filling Urgent

    INDEX is generally preferable to INDIRECT (more flexible and non-volatile) so I would recommend you go with Martin's formula, although both will work (I hope!)

    Regards

  8. #8
    Registered User
    Join Date
    08-13-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Advanced formula filling Urgent

    Thank you so much! Martins formula works excellent!

  9. #9
    Registered User
    Join Date
    08-13-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Advanced formula filling Urgent

    Hey guys, follow up question about index, think you could help me with:

    I have a problem with filling down a formula and using the index function

    D3: =IF(AND($GZ$4<=$B3;$B3<=$HA$4);'Sheet 2'!$E$7/$HB$4;0)

    What I want in D4 is:

    D4: =IF(AND($GZ$4<=$B4;$B4<=$HA$4);'Sheet 2'!$E$7/$HB$4;0)

    This is done simply by draging d3 down to d4,

    But my issue is that i want this pattern horizontelly

    E3: =IF(AND($GZ$5<=$B3;$B3<=$HA$5);'Sheet 2'!$E$12/$HB$5;0)

    E4: =IF(AND($GZ$6<=$B3;$B3<=$HA$6);'Sheet 2'!$E$17/$HB$6;0)

    and so on. I know that i should use the index function but i cant seem to get it to work, any solutions?

    I am trying this:
    D3: =IF(AND($GZ$4<=$B3;$B3<=$HA$4);INDEX('Sheet 2'!$E:$E;ROWS($A$1:A1)*5+2)/$HB$4;0)
    But i think this only help the pattern $E$7, $E$12, $E$17

    Best regards!

    Ps. I also posted this in http://www.excelforum.com/excel-form...html?p=3364467

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced formula filling Urgent

    E3: =IF(AND($GZ$5<=$B3;$B3<=$HA$5);'Sheet 2'!$E$12/$HB$5;0)

    E4: =IF(AND($GZ$6<=$B3;$B3<=$HA$6);'Sheet 2'!$E$17/$HB$6;0)
    thats not horizontally.

+ 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. Replies: 2
    Last Post: 08-08-2013, 12:45 AM
  2. Filling formula down a column and have that formula progressively grow.
    By BeckyT in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2013, 10:47 AM
  3. Replies: 2
    Last Post: 01-06-2013, 05:50 AM
  4. [SOLVED] blank rows filling (Urgent)
    By Lolly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2006, 07:15 PM
  5. [SOLVED] Advanced Filter stopped working. URGENT
    By Bren in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2005, 10:35 AM

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