How to output the results of 2 different cells into a single cell in Excel?
I am trying to get D5 and D6 into cell C6 so that I looks like this ($15,000.00 - $25,000.00) The formula I used to do this is :
=DOLLAR(D5)&" - "&DOLLAR(D6)
My first question is, is there an easier/better way to accomplish this?
My second question, how will I remove the decimal places in C6, as the number formatting decimal spacer doesn't work for this situation?
Please see screen shot below.
Solution 1:
With Office 365 or Excel 2019 use TEXTJOIN and TEXT:
=TEXTJOIN(" - ",,TEXT(D5:D6,"$#,##0"))
If using in Excel 2019 this may require the use of Ctrl-Shift-Enter instead of Enter when exiting edit mode.
If older version then instead of DOLLAR() use TEXT:
=TEXT(D5,"$#,##0")&" - "&TEXT(D6,"$#,##0")