Dual Formats in a Single Cell

lpsnyc

New Member
Joined
Nov 12, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I have a simple spreadsheet that has two inputs...Distance and Time.
I want to display two possible results in the third cell...either Minutes per Mile or Speed.
The problem is Min/mile is in TIME format while SPEED is in number format.

How do I have dual formats in this cell depending on whether the column title reads Min/Mile or Speed?
I have the formulas for Min/Mile and Speed already calculated based on the column title.

If column C title reads Min/Mile, then format is in TIME format
1695136210108.png


If column C title reads Speed, then format is in NUMBER format
1695137369454.png


Thanks
Lance
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You could use conditional formatting to set the format based on the value in C1
 
Upvote 0
Hi Fluff
Thanks for the suggestion. I tried Conditional formatting based on the value in C1 but it does not give me the option to format as time.
Any other suggestions?

Thanks
 
Upvote 0
In conditional formatting click on format & then Custom, Time
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,405
Messages
6,171,925
Members
452,433
Latest member
Woodchuck76

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top