Only Date in separate column

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
883
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I have tried to fix the date in a separate column and facing a value error.
Can you please let me know how to fix the below formula?

Cell Formulas
RangeFormula
B2:B4B2=TODAY()
C2C2=TEXT(B2,"d"&"/"&"m"&"/"&"yYYY")
C3:C4C3=TEXT(B3,DAY(A3)&"/"&"m"&"/"&"yYYY")



Regards,
Sanjeev
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Excel Formula:
C3=TEXT(DAY(A3)&"/"&MONTH(B3)&"/"&YEAR(B3),"dd/mm/yyyy")

Hey Mohadin,

Sorry for the late response. you formula work perfectly

Thank you for your help on this.

Regards,
Sanjeev
 
Upvote 0
Perfect !!Thanks Peter

Hey Mohadin,

.... you formula work perfectly

Did I misunderstand?
I thought that the formula would have to apply to data like your row 2 as well as rows like 3 & 4. My formula & mohadin's give different results for data like that.

Cell Formulas
RangeFormula
B2:B4B2=TODAY()
C2:C4C2=TEXT(DATE(YEAR(B2),MONTH(B2),IF(A2="",DAY(B2),A2)),"d/m/yyyy")
D2:D4D2=TEXT(DAY(A2)&"/"&MONTH(B2)&"/"&YEAR(B2),"dd/mm/yyyy")
 
Upvote 0
Did I misunderstand?
I thought that the formula would have to apply to data like your row 2 as well as rows like 3 & 4. My formula & mohadin's give different results for data like that.

Cell Formulas
RangeFormula
B2:B4B2=TODAY()
C2:C4C2=TEXT(DATE(YEAR(B2),MONTH(B2),IF(A2="",DAY(B2),A2)),"d/m/yyyy")
D2:D4D2=TEXT(DAY(A2)&"/"&MONTH(B2)&"/"&YEAR(B2),"dd/mm/yyyy")


Hey Peter,
Sorry for the delay.

I have check both formula and work well as per my requirement.

Thanks for checking at your end as well.

Regards,
Sanjeev
 
Upvote 0
I have check both formula and work well as per my requirement.
In that case if you are happy with either of the results in row 2 of my previous post, what about this simpler formula in column E?

Cell Formulas
RangeFormula
B2:B4B2=TODAY()
C2:C4C2=TEXT(DATE(YEAR(B2),MONTH(B2),IF(A2="",DAY(B2),A2)),"d/m/yyyy")
D2:D4D2=TEXT(DAY(A2)&"/"&MONTH(B2)&"/"&YEAR(B2),"dd/mm/yyyy")
E2:E4E2=--A2&TEXT(B2,"\/m/yyyy")
 
Upvote 0
In that case if you are happy with either of the results in row 2 of my previous post, what about this simpler formula in column E?

Cell Formulas
RangeFormula
B2:B4B2=TODAY()
C2:C4C2=TEXT(DATE(YEAR(B2),MONTH(B2),IF(A2="",DAY(B2),A2)),"d/m/yyyy")
D2:D4D2=TEXT(DAY(A2)&"/"&MONTH(B2)&"/"&YEAR(B2),"dd/mm/yyyy")
E2:E4E2=--A2&TEXT(B2,"\/m/yyyy")


Hey Peter,

I understood what you wanted to point out.
yes if we don't have data on column A it will throw me "0" Date.

Thanks for checking:)
Regards,
Sanjeev
 
Upvote 0

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

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