+ Reply to Thread
Results 1 to 6 of 6

If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

  1. #1
    Registered User
    Join Date
    12-24-2010
    Location
    KL,MY
    MS-Off Ver
    Excel 2003
    Posts
    16

    If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    Hi,

    I've one question. I've created several UDF.

    Please Login or Register  to view this content.
    The input (FC,CT,PSM,TMS) are taken from several cells.
    Say, FC = "A1", CT = "B1", PSM = "C1", TMS = "D1"

    "E1" is my answer

    And I also have a combox, where the user can change the function
    Please Login or Register  to view this content.
    And store at B2

    My question is, when the user change the combox , how to change or create the UDF (based on the combox) at "E1" with maintaining the input cells (A1,B1,C1,D1)

    I hope the question clear..

    If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    Merry Christmas & A Happy New Year!!!
    Last edited by gone83; 12-27-2010 at 02:22 AM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    You could write a fifth UDF and use the formula
    =ROT(A1; B1; C1; D1; B2)

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    12-24-2010
    Location
    KL,MY
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    Thanks mikerickson.

    It worked!!!

    I have another question

    If you notice when we typed some formula in excel, say =ROT(A1; B1; C1; D1; B2) in E1 cell.
    Then, we drag A1 cell to A2, the formula in E1 change automatically to =ROT(A2; B1; C1; D1; B2)

    Is it possible to do in VBA? i.e
    Please Login or Register  to view this content.

    them we drag R10 to R11, the code change automatically :
    Please Login or Register  to view this content.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    Hi gone83,

    With your original question, I've seen answers where programmers create a string above the line and then let ActiveCell.Formula = String. I fumbled with it a while and couldn't get it to work a few hours ago.

    For the second question about relative referencing a formula in VBA, you need to use
    ActiveCell.FormulaR1C1 = .

    Look at http://www.your-save-time-and-improv...e_example.html for an example or two.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    The second question has to do with Excel's relative and absolute addressing.
    If the formula =ROT(A1, $B$1, $C$1, $D$1, $B$2) is put into a cell, and dragged down one cell, the formula in the lower cell will have adjustded the relative reference (A1) and left the absolute references unchanged

    =ROT(A2, $B$1, $C$1, $D$1, $B$2)

  6. #6
    Registered User
    Join Date
    12-24-2010
    Location
    KL,MY
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: If only i can do this =CONCATENATE("=ROT_";B2;"(A1;B1;C1;D1)")

    Thanks guys!!!!

+ 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