+ Reply to Thread
Results 1 to 4 of 4

Thread: Separate Functions in One Cell

  1. #1
    Registered User
    Join Date
    06-21-2008
    Posts
    2

    Separate Functions in One Cell

    Is it possible to put separate functions in one cell....I am doing budgeting where I have the previous month's expense and then the current month's expense.....I would like to have it so i have the current expense in the cell and then in parentheses in the same cell the percentage change from the previous months.... i.e. $575 (-20%)

  2. #2
    Forum Guru mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,984
    You can

    This formaula displays the values of A1 & A2 in the one cell

    =A1&" - "&A2
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    06-21-2008
    Posts
    2
    more like this is what I need

    (A1)Month 1 Expense: 25
    (B1)Month 2 Expense: 30

    I want B1 to say..... 30 (+5)


    5 being the difference between the two months in parentheses...and can you make a function where it does +'s and -'s?

    THanks!

  4. #4
    Forum Guru mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,984
    evanznotdead

    I did not give a detailed answer previously as I thought you might be able to see how to join various rsults from my reply


    Lets see if I can explain this in a way you can understand

    To calculate/display left part of cells display
    To display the value of B1 you use
    =B1
    The above could be any formula like =SUM(B1:B16)

    To Display/Calculate the right side of the cell display
    to display the result of B1-A1 you use
    =B1-A1

    As we can not use cell formatting to display the final result in the format required we use the text command, list the format required

    =TEXT(B1-A1,"+$#,##0.00;-$#,##0.00")

    To wrap the rsults in () we join text and the above formula using & symbol
    ="(" &TEXT(B1-A1,"+$#,##0.00;-$#,##0.00") &")"


    Join Left and Right Cell Display FormulasNow we join the left and right parts together and also add a space in front of the ( to help seperate the 2 displayed values

    =B1&" (" &TEXT(B1-A1,"+$#,##0.00;-$#,##0.00") &")"

    Note:-
    Change formating as required
    "+0;-0")
    Text formatting may also needed to be added to the left part of the formula
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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.2.0