+ Reply to Thread
Results 1 to 14 of 14

Multiple Criteria for Dynamic Range

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Multiple Criteria for Dynamic Range

    My spreadsheet has a yield curve table - a column with "terms" (column A) and a column with "PV01s" (column B) - the table resides on the 'SENSITIVITIES_PV01' sheet.

    I would like to select column A and search for terms that contain "STSCB", "IRF", "IRS", and terms that begin with an integer.

    I would then like to return the corresponding PV01 data from column B into range [F5:F7], [F8:F19], [F20:F35], and [N5:N25] respectively, on another sheet, 'PNL_DATA'.

    I have zero idea how to code something so complex, so unfortunately I have nothing any help would be LIFESAVING
    Attached Files Attached Files
    Last edited by jasperhuang93; 07-18-2012 at 01:46 PM. Reason: Added sample file

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Multiple Criteria for Dynamic Range

    Hi Jasperhuang93,

    Welcome to the forum.

    Would suggest you to please upload a sample workbook with dummy data. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    Hi Dilipandey,

    I have done as suggested and attached a file with dummy data, thanks.
    Last edited by Cutter; 07-20-2012 at 10:29 AM. Reason: Removed whole post quote

  4. #4
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    Please help! Urgent

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Multiple Criteria for Dynamic Range

    Hi Jasperhuang93,

    Try using below array formula:-

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


    See attached;- Sample(16).xls

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Last edited by dilipandey; 07-19-2012 at 10:35 AM. Reason: formula tag

  6. #6
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    Hi, in your sample document, the range with the formula contains "#NAME?" errors?
    Last edited by jasperhuang93; 07-19-2012 at 11:06 AM.

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Multiple Criteria for Dynamic Range

    There is no error, see the screenshot image attached which clarifies this

    No # Name Error.jpg

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  8. #8
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    Hm.. how strange, I am gettign an error on my machine, are there any add-ins or anything I may not have checked off?
    Attached Images Attached Images

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Multiple Criteria for Dynamic Range

    There is no add-in

    Check if you are able to apply some other formulas like sum, count etc
    Check if your workbook is in auto-calculate mode

    Consult your local IT helpdesk, at last

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  10. #10
    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: Multiple Criteria for Dynamic Range

    Your file and profile indicate you are using 2003.

    IFERROR() will not work for you you will need IF(ISERROR(),,)

    IFERROR() will return #NAME? error with 2003
    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.

  11. #11
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    Would this be the correct formula using IF(ISERROR(),,)?

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

  12. #12
    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: Multiple Criteria for Dynamic Range

    I'm not clear as to what you are trying to achieve, but try ...
    In F5
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You might need to change the red 0

    If this is correct then you don't need Column A, you could use this ...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-18-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Multiple Criteria for Dynamic Range

    @Marcol, works! Thanks a bunch

  14. #14
    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: Multiple Criteria for Dynamic Range

    Hmm...?
    I'm not sure that it does!

    See the attached workbook.

    In Sheet("SENSITIVITIES_PV01") C1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag/Fill Down
    This returns the second part of the codes beginning "STSCD","IRF", and "IRS" and codes beginning with an integer.

    Then in Sheet("PNL_DATA") F5
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag/Fill Down

    This returns more matches than my initial reading of your problem does, only you can decide what is correct.
    Attached Files Attached Files

+ 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