Can I use any sort of formulas in custom formatting?

ExcelantePicante

New Member
Joined
Aug 19, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I have a report that gives the time as "8/19/2021 12:26:01 AM -04:00", but I need the " -04:00" part to be taken off. Is there any way to custom format or integrate a formula within that custom format so this would be the case?

I want to avoid altering the spreadsheet otherwise. My alternate solution is to insert a row with the formula =LEFT(A2, LEN(A2)-7) to remove the extra information. However, I would like to do this by directly changing the format of the cells themselves so I don't have to adjust anything else. Thanks for the help!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I would say that what you have is a text string rather than a valid time, if that is the case then it can not be formatted.

You could try using text to columns with - as a delimiter then skip the second column.
 
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,959
Members
452,539
Latest member
delvey

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