+ Reply to Thread
Results 1 to 7 of 7

Loop this formula?

  1. #1
    Registered User
    Join Date
    10-07-2011
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    2

    Loop this formula?

    Hi, just wondering is it possible to create a loop for this formula?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Basically its in every cell, I add 1 to C, so it keeps going, C6, C7, C8, C9, etc?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Loop this formula?

    Not sure what you want - is this it?

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Loop this formula?

    I don't understand what you mean by a "loop". However, the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in sheet1 will get the row number of the value in column B of sheet1 that matches sheet2, A2 and create the address Cn
    and multiply the sheet2, B2 number by what's in Cn
    or this one (preferred):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by protonLeah; 07-03-2012 at 12:21 AM.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-07-2011
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Loop this formula?

    thanks for the quick reply guys
    attached is my excel file
    https://dl.dropbox.com/u/48832745/test1.xlsx

    Basically I want to create a formula that I can just drag it down to the next row.
    What I did is I created a simple drop down options, it shows the different products, if I select "Product 1", the price reflecting to Product 1's should display.
    I cant simply copy the formula it wouldnt work since A2 is always fixed to A2. Any suggestions?

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Loop this formula?

    Hi

    Do you mean something like this?
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Loop this formula?

    Try with this formula in cell E3:
    =INDEX(Sheet2!$B$2:$B$9;MATCH($B3;Sheet2!$A$2:$A$9;0))*$C3
    and copy down
    //Ola

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Loop this formula?

    Going by your original post, you just need a couple of $'s in your formula:

    =IF(B3=Sheet2!A$2,C3*Sheet2!B$2

    (and complete the rest of the formula) and drag down

    The $ locks the row references so that the A2 and B2 will stay the same when you drag down. That is called "absolute referencing".

+ 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