+ Reply to Thread
Results 1 to 5 of 5

If statement to evaluate the next record...

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    1

    If statement to evaluate the next record...

    I am trying to set up a template to make my month end processing easier. I want to automatically pull data from a Details worksheet that has an "I" in column E to a worksheet called Insurance, in the same workbook. I need to return all values into the corresponding colums A:P. The problem is, there are H's and P's intermixed with the I's. I'm not sure of the best way to approach this issue. Vlookup seems like it might work...but if E2<>I, I have no idea how to get it to evaluate the next record...

    Thanks!
    G

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: If statement to evaluate the next record...

    With the help of an index number column it can be done. Possibly it can be done without the index number column as well but the hour is waay to late for that now.
    I can try again tomorrow.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: If statement to evaluate the next record...

    It was indeed possible.
    Formula now looks like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It's an array formula by the way.
    Attached Files Attached Files

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If statement to evaluate the next record...

    hi nessabell3, welcome to the forum. it's always good if you can upload a sample Excel file. here's an alternative in cell A2 of "Insurance" sheet:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    change all row 10 to something bigger to fit in your data. you can copy the formula down or across as much as you like after that. being an array formula, you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER. When done correctly, you should see curly brackets surrounding it
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    12-26-2012
    Location
    Meerut
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: If statement to evaluate the next record...

    In A4
    note this is an array formula need to Cntrl + Enter

    =IFERROR(INDEX(Sheet2!$D$2:$D$26,SMALL(IF(Sheet2!$E$2:$E$26="I",ROW(INDIRECT("1:"&ROWS(Sheet2!$D$2:$D$26))),""),ROWS(Sheet1!$D$3:D3))),"")

    In B4 and drag it to C4
    =SUMIFS(Sheet2!F:F,Sheet2!$D:$D,Sheet1!$A4)

    R's
    Amit Kumar

+ 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