Question about Excel Worksheet Formula Syntax - Using {}

Posted on 2012-08-20
Last Modified: 2012-08-20
I have thefollowing formula. I would like to use reference cells for the parts of the formula which are in bold. So I would like to put D5 for the first Date and D6 for the second date.


When I substitute those cells with the dates  I get an error which says "The formula typed contains an error")

I believe this is because I am not using the correct syntax.

How can I substitute the dates with actual cells?

Question by:awesomejohn19
    LVL 50

    Accepted Solution

    Try using CHOOSE function in there, i.e.


    I'm assuming that D5 and D6 contain the values 20111230 and 20120816 (which are numbers not dates). If D5 and D6 contain dates then try this version instead

    =BDP(C5,"CUST_TRR_RETURN_HOLDING_PER ",{"CUST_TRR_START_DT","CUST_TRR_END_DT","CUST_TRR_CRNCY"},CHOOSE({1,2,3},TEXT(D5,"yyyymmdd")+0,TEXT(D6,"yyyymmdd")+0,"USD"),)/100

    regards, barry

    Author Closing Comment

    Thanks for the quick answer. The first formula works!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now