Text and formula in a same cell (Excel)

  • Thread starter Thread starter dblimbu2008
  • Start date Start date
D

dblimbu2008

Please help on

How can I put text and formula in a same cell i.e. This is total: ####
(sum of different cell)

Thanks
 
You could use a UDF (demo one below). Add this to a standard module, then in
the cell you wish to show the total use (example sums B1:F1)

= TotalMe(B1:F1)


Function TotalMe(rng As Range) As String
If Not rng Is Nothing Then
TotalMe = "This Total is: " & Application.WorksheetFunction.Sum(rng)
End If
End Function
 
Suppose you have enteries in Rows or Columns then you can put this formula in
a cell, where you would like to show sum:

Syntax: ="Whatever text you want : " & SUM(Range)

Example:
="Total : " & SUM(A4:D4)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top