none
Cell Reference RRS feed

  • Question

  • Hi,

    I have a UDF. I usually pass the cell reference as a parameter like below. While processing #1 is replaced with A1 value.

    =TF("IBM","PriceClose(sdate=#1)",A1)

    But users always hated that you had to cell reference a parameter as #1 and then add reference at the end.  I had to do because there is double quote  in the parameter. Can we be more sophisticated to read cell references inline?   

    Monday, October 13, 2014 6:31 AM

Answers

All replies

  • Can you share the code for the TF() function with us? It's hard to rewrite a function or create a wrapper without knowing it's full definition or what the function does..
    Monday, October 13, 2014 7:05 AM
  • This is huge code. I just would like to know that  is there any other way to pass cell reference withing double quote.


    • Edited by DHegde Monday, October 13, 2014 8:49 AM
    Monday, October 13, 2014 8:48 AM
  • Ok, you can create a wrapper for this function call, however we still need to know what are the arguments, like what is the function expecting them to be? Their types? What are they representing?

    What's `TF()`? what's `PriceClose()`? why is there a parameter passed like `sdate = #1` ... all those need an answer before we can proceed further.

    Monday, October 13, 2014 9:27 AM
  • TF() is user defined function which takes several parameters and connects to database,gets the data.

    //Without cell referencing of 0d

    =TF("IBM","PriceClose(sdate=0d)") which means that  Get the PriceClose value for last traded day(0d) for IBM.

    //When  I cell reference for sdate(start date) 

    =TF("IBM,"PriceClose(sdate=#1)",A1).  While processing this formula, I replace #1 with value of A1 and send it to database. Since I cannot do =TF("IBM","PriceClose(sdate=A1)") which is why I have done it as =TF("IBM,"PriceClose(sdate=#1)",A1)

    Monday, October 13, 2014 10:30 AM
  • Oh ok,

    try it like this

    =TF("IBM,"PriceClose(sdate=" & A1 & ")",A1)


    Monday, October 13, 2014 10:59 AM
  • ok..thanks..I will try this.
    Monday, October 13, 2014 11:30 AM
  • great, don't forget to let us know if that worked for you and vote and mark an answer which helped :)
    • Marked as answer by DHegde Tuesday, October 28, 2014 4:47 AM
    Monday, October 13, 2014 1:25 PM
  • Hi,

    Since we haven't heard from you for a long time, I temporarily close this case. I mark useful reply as answer. If you have any concerns, please free feel to reopen it or submit a new question.

    Thanks for your understanding.

    Best regards,

    Luna


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 20, 2014 7:39 AM
    Moderator