Extract Day from a Date

charllie

Well-known Member
Joined
Apr 6, 2005
Messages
986
Hi All

I am sure this has already been covered but i cannot seem to find it anywhere by searching, so apologies if this is a repeated request.

In column "B" i have a list of dates which are formatted to display as "25/07/2018".
In column "C" i have the formula "=TEXT(B2,"dddd"). This displays the same date as a day (Wednesday).

So i am left with 2 columns where one shows the actual date and one shows the day for that date.

My problem is that when a cell in column "B" is left blank/has no date in it the adjacent cell in Column "C" is displaying as a Saturday. I want it to be blank as there is no day in there. This is because further down the line i am using a "countif" calculation to record how many occurrences of a Monday, Tuesday happen etc.

I have tried the "iferror" function but cannot get it to work.

Does anyone have any ideas that could help. I would appreciate your help.

Thanks

Charllie
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
try =IF(B2<>"",=TEXT(B2,"dddd"),"")
 
Upvote 0
Hi Nemmi69

Than you for the speedy response. I had to remove the "=" before the TEXT bit as was getting an error, but once that was done it worked a treat.

I did look at an if statement but it didn't work for me, although i only used ">" and not "<>" as in your formula.

Thank you very much for your help, i really appreciate your time.
 
Upvote 0
sorry, that was my error on the "=" :rolleyes: The "<>" means not equal. You could reverse it all to check if it equals nothing ("") =IF(B2="","",TEXT(B2,"dddd"))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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