+ Reply to Thread
Results 1 to 4 of 4

Custom Cell Format With Calculation

  1. #1
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    473

    Custom Cell Format With Calculation

    Hi all,

    I was wondering if it would be possible to have a calculation inside a cell format.

    For example if I type 7 into a cell and the custom format of the cell is #"XXX" then the cell would display as 7XXX

    But lets say I have 2 cells. Cell A1 is selling price per unit (£1.50), Cell A2 is Quantity (100). I would like some format that would take the Quantity figure that I enter and then put Quantity * Selling Price in brackets after it.

    So if I enter 100 in cell A2 (QTY) then it would display as 100 (£150.00)

    Pretty sure the answer will be 'it can't be done' but fingers crossed anyway!

    Thanks
    John

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Custom Cell Format With Calculation

    Hi,

    A format can't add anything to a cell it can only display it in a different way.
    You can obviously do it with a third cell

    =A2&" (£"&TEXT(A1*A2,"0.00")&")"
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    473

    Re: Custom Cell Format With Calculation

    OK, thought so. Third cell option it is then!

    Thanks for the reply Richard, appreciate it.

    John

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Custom Cell Format With Calculation

    Second thoughts.

    You could do it with a VBA Sheet Change macro

    Please Login or Register  to view this content.

+ 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