Flash Fill Question

Glasgowsmile

Active Member
Joined
Apr 14, 2018
Messages
280
Office Version
  1. 365
Platform
  1. Windows
Good morning,

Currently, I'm trying to compare a date with another cell that has a date in it but it's formatted in a way that conditional formatting isn't working.

For example:
A1 = 6/11/2021
O1 = 17May2021 MON

I'm trying to figure out how to extract that 17May2021 into another cell as a date so I can flash fill it down the spreadsheet and then compare A1 <> O1 essentially.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Perhaps
Excel Formula:
=0+TEXT(LEFT(A1,FIND(" ",A1)),"dd/mm/yyyy")
 
Upvote 0
Assuming the format of O1 is always "ddmmmyyyy" try:

=DATEVALUE(LEFT(O1,9))
and format that as a date .
 
Upvote 0
Solution
Perhaps
Excel Formula:
=0+TEXT(LEFT(A1,FIND(" ",A1)),"dd/mm/yyyy")

Thanks, that came back with a value error for some reason but I did find a way to get it down but now I'm trying to use VBA to add the date into the cell and I'm having an error

Keeps saying "Expected )" for the Formula line.

VBA Code:
ws.Range("W36).Formula = "=DATE(AB36,AA36,Z36)"
ws.Range("W36").Select
Selection.AutoFill Destination:=Range("W36:V500")
 
Upvote 0
Assuming the format of O1 is always "ddmmmyyyy" try:

=DATEVALUE(LEFT(O1,9))
and format that as a date .
That was a quick and easy fix, thanks!

Same issue with the above regarding the VBA though.

VBA Code:
ws.Range("W36).Formula = "=DATEVALUE(LEFT(O36,9))"
ws.Range("W36").Select
Selection.AutoFill Destination:=Range("W36:V500")

Disregard! I found that I was missing an " around W36.

Thanks for the help!
 
Upvote 0
That was a quick and easy fix, thanks!

Same issue with the above regarding the VBA though.

VBA Code:
ws.Range("W36).Formula = "=DATEVALUE(LEFT(O36,9))"
ws.Range("W36").Select
Selection.AutoFill Destination:=Range("W36:V500")

Disregard! I found that I was missing an " around W36.

Thanks for the help!
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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