Excel use same cell in formula

It could be a basic one, trying to apply formula =TEXT(A2/(24*60*60),"dd \d\a\y\s hh:mm:ss") on the same column Seconds to a new computed value. For eg., 495079 tranform to 05 days 17:31:19. I don't want to bring in additional columns. Any help is appreciated.

Excel use same cell in formula

asked Jun 9, 2020 at 0:22

2

Duplicate: this answer.


@MADHU VS - your formula is exactly like the one in that answer. Maybe what's confusing you is you think the answer should be 5 days - it's really 4. "04 days 17:31:19"

The person who answered on the other thread also made a useful suggestion not to use the text function. Use =A2/(24*60*60) on your sheet, then go into the time formatting dialog and set up a custom format dd \d\a\y\s hh:mm:ss.

I just tried that, and it works perfectly. I was able to subtract 1 from it in a different cell, and got "03 days 17:31:19" (if that would be useful to you).

answered Jun 9, 2020 at 2:43

24*60*60 = 86400.

Enter =86400 in a cell. Copy that cell. Just select the range of the "Second" numbers only (not the entire column) and right click then select Copy paste special, select divide (Also select values if so desired), click OK. No need for another column.

Then format cells pressing Control + 1

answered Jun 9, 2020 at 7:31

Excel use same cell in formula

NareshNaresh

2,9442 gold badges8 silver badges15 bronze badges

Excel is a great tool to analyze and organize data. Sometimes we need to use a lot of formulas in Excel. By default Excel only shows the formula values in the cell. So, sometimes it may get really hard to understand what is actually going on, only by looking at the formula values. But adding extra text lines illustrating the formula values can be beneficial for all the report readers. In this regard, you will teach you to add text and formula in the same cell in Excel throughout the article using 4 relevant examples.


Download the Practice Workbook

You can download the Excel file from the following link and practice along with it.


4 Examples Regarding Add Text and Formula in the Same Cell in Excel

Example 1: Add Text and Formula in the Same Cell in Excel

Look at the following picture. An Income-Expense List has 4 columns. We have calculated the monthly savings for each of the persons in the Name column.

Now just from looking at the values, it’s quite uncomfortable to get the idea of what those values are actually about.

To increase the readability, we can add descriptive text with these values. So that any kind of reader can actually understand what those numbers are actually about.

We can merge both the descriptive texts as well as formulas to make those numbers more readable.

Excel use same cell in formula

To add both the text and formula in the same cell in Excel,

❶ Type the following formula in cell E5 and hit the ENTER button.

=B5&"'s monthly saving is: "&C5-D5

To add both the text and formula in the same cell, you have to use the symbol, & and double inverted comma(). So, if you want to add texts in between cell values or formulas or functions, just separate them using & and double inverted commas.

For example in the above formula, first, we have inserted cell B5. Then we have inserted the text “‘s monthly savings is: “. To separate this text line from the cell reference and formula, we have used the symbol, &.

Excel use same cell in formula

❷ To apply the same formula for the rest of the cell, take your mouse cursor to the right-bottom corner of cell E5 and drag the Fill Handle icon up to cell E10. That’s it.

Excel use same cell in formula

So, after adding the text and formula in the same cell, the final result will look like this:

Excel use same cell in formula

Add Text and Formula at Any Sequence

You can add the text and formula at any sequence in the same cell. Just make sure you separate the text and formula using the symbol, & and double inverted commas (“).

For example, the following formula will add text first, and then the formula:

="Robert's monthly saving is: "&C5-D5

Excel use same cell in formula

If you want to use the formula first and the text appears later, use the following formula:

=C5-D5 &" is Robert's monthly savings."

Excel use same cell in formula

So, I really hope you can add text and formulas at any sequence in the same cell in Excel.

Read More: Replace Text of a Cell Based on Condition in Excel (5 Easy Methods)


Example 2: Add Text and Formula in the Same Cell in Excel with TEXT Function

In this example, I will show you how to add text and formula in the same cell with the Text Function in Excel.

So, let’s get started.

Without using text with the formula, the result of the Work Hour column looks like this.

Excel use same cell in formula

Let’s add more information with the formula result, using the following steps.

❶ First type the following formula in the cell, E5, and hit the ENTER button.

=B5&"'s total work hour is: "&TEXT(D5-C5,"h")

In this formula, we have first inserted a cell, B5. Then we used a text line. To separate the text line from the cell value, B5 we have used the symbol, & and the double inverted comma (). Finally, we have used the TEXTfunction with its arguments.

Excel use same cell in formula

❷ Drag the Fill Handle icon from cell E5 to E10.

After that, the data table will look like this:

Excel use same cell in formula

Read More:How to Replace Text in Excel Formula (7 Easy Ways)


Similar Readings:

  • Find and Replace a Text in a Range with Excel VBA (Macro and UserForm)
  • How to Find and Replace Using Formula in Excel (4 Examples)
  • Find and Replace Values in Multiple Excel Files (3 Methods)
  • How to Find and Replace Asterisk (*) Character in Excel
  • How to Replace Special Characters in Excel (6 Ways)

Example 3: Add Text and Formula in the Same Cell in Excel

In this section, I’m going to show you how to add the formula with dates in the same cell in Excel.

To do so,

❶ Insert the following formula in the cell, E5.

=B5&" from "&TEXT(C5,"dd-mmm-yyyy")&" to "&TEXT(D5,"dd-mmm-yyyy")

In the above formula, first I’ve inserted cell B5 and a text. In between them, I used the symbol, & and double inverted commas, () to fulfill the syntax requirement. Then the TEXT function comes with its arguments.

After that another text comes which is also separated by the symbol, & and double inverted commas, (). Then the second TEXT function comes with its corresponding arguments.

❷ Then press the ENTER button.

❸ To apply the above formula in all the cells, drag the Fill Handle icon from cell E5 to cell E10.

That’s all you need to do.

Excel use same cell in formula

Read More: How to Add Text before a Formula in Excel (4 Simple Ways)


Example 4: Use CONCATENATE Function to Add Text and Formula in the Same Cell in Excel

You can use the CONCATENATEfunction to add text and formula in the same cell in Excel.

To do that, follow the steps below:

❶ First of all type the following formula in the cell, E5.

=CONCATENATE("Robert's monthly saving is: ",C5-D5)

❷ After that press the ENTER button.

❸ Drag the Fill Handle icon from cell E5 to cell E10 and you’re done with it.

Excel use same cell in formula

Related Content:Excel VBA: How to Find and Replace Text in Word Document


Things to Remember

📌 To separate the text and formula, use the symbol,& and double inverted commas, () in between them.


Conclusion

To sum up, we have discussed adding text and formulas in the same cell in Excel with 4 relevant examples. You are recommended to download the practice workbook attached along with this article and practice all the methods with that. And don’t hesitate to ask any questions in the comment section below. We will try to respond to all the relevant queries asap. And please visit our website Exceldemy to explore more.


  • How to Substitute Multiple Characters in Excel (6 Ways)
  • Find and Replace from List with Macro in Excel (5 Examples)
  • How to Find and Replace Multiple Words at Once in Excel (7 Methods)
  • How to Find and Replace within Selection in Excel (7 Methods)
  • [Fixed!] Excel Find and Replace Not Working (6 Solutions)

How do I use the same cell in an Excel formula?

Use cell references in a formula.
Click the cell in which you want to enter the formula..
In the formula bar. , type = (equal sign)..
Do one of the following, select the cell that contains the value you want or type its cell reference. ... .
Press Enter..

How do you repeat a cell in a formula?

This article will help you..
Repeat a cell value until new value is seen or reached with formula. ... .
Select the next cell (F3) in the help column, enter formula =IF(E3="",F2,E3) into the Formula Bar then press the Enter key..
Keep selecting cell F3, drag the Fill Handle down to repeat all cell values until new value is seen..

How do I reference one cell in Excel?

If you are creating a reference in a single cell, press Enter. If you are creating a reference in an array formula (such A1:G4), press Ctrl+Shift+Enter. The reference can be a single cell or a range of cells, and the array formula can be one that calculates single or multiple results.

How do you keep the same cell in a formula when dragging?

Drag or copy formula and lock the cell value with the F4 key For locking the cell reference of a single formula cell, the F4 key can help you easily. Select the formula cell, click on one of the cell reference in the Formula Bar, and press the F4 key. Then the selected cell reference is locked.