简体   繁体   中英

Excel apply a formula to same cell

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.

在此处输入图像描述

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).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM