+ Reply to Thread
Results 1 to 3 of 3

how do i get excel to display the result of a formula i build?

  1. #1
    Mike
    Guest

    how do i get excel to display the result of a formula i build?

    Cell A1 is jan, B1 is feb, C1 is mar, etc
    row 2 has values for each month
    cell C1 has a date 2/3/05
    I want to sum the values for jan through X where X is month(C1)
    I built a text string I want Excel to evaluate as a formula. What's the
    function to do that?

    For instance, C2 might be ="="&char(64+month(C1))&2
    I want this to resolve the formula =B2, not display "=B2"

    Any ideas?
    Thanks,
    Mike



  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Hi Mike

    To answer your specific query - use INDIRECT

    =INDIRECT(CHAR(64+MONTH(C1))&"2")

    but if your aim is to sum row 2 from A2 to another cell based on a specific month then there's probably an easier way to do that based on INDEX/MATCH type formula.

    Are your entries in row 1 text? If so and based on a date in A3

    =SUM(A2:INDEX(A2:L2,MATCH(TEXT(A3,"mmm"),A1:L1,0)))

  3. #3
    Mike
    Guest

    Re: how do i get excel to display the result of a formula i build?

    Thank you DLL, I think either will work.
    -Mike
    "daddylonglegs" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi Mike
    >
    > To answer your specific query - use INDIRECT
    >
    > =INDIRECT(CHAR(64+MONTH(C1))&"2")
    >
    > but if your aim is to sum row 2 from A2 to another cell based on a
    > specific month then there's probably an easier way to do that based on
    > INDEX/MATCH type formula.
    >
    > Are your entries in row 1 text? If so and based on a date in A3
    >
    > =SUM(A2:INDEX(A2:L2,MATCH(TEXT(A3,"mmm"),A1:L1,0)))
    >
    >
    > --
    > daddylonglegs
    > ------------------------------------------------------------------------
    > daddylonglegs's Profile:
    > http://www.excelforum.com/member.php...o&userid=30486
    > View this thread: http://www.excelforum.com/showthread...hreadid=504385
    >




+ 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