20MAR2024.png
Hopefully my picture makes sense.
20MAR2024.png
Hopefully my picture makes sense.
Try:
=IF(AT2:AZ10="","x",AT2:AZ10)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
um... i think you forgot the most important thing as mentioned in the picture. It is underlined and bolded. The outcome of what i want is different from what you gave. (As seen in picture)
Not really clear to me though.
This is how I guess.
You need to insert a space between day and month in AO9 like attached.
26Mar to 27 Mar 2024
Sub test() Dim a, b, i As Long, ii As Long, sd As Date, ed As Date a = Range("ao4", Range("ao" & Rows.Count).End(xlUp)).Resize(, 3) With Range("at2").CurrentRegion.Resize(UBound(a, 1) + 2, 7) b = .Value For i = 1 To UBound(a, 1) sd = CDate(a(i, 2)): ed = CDate(a(i, 3)) For ii = 1 To UBound(b, 2) If (sd <= b(1, ii)) * (ed >= b(1, ii)) Then b(i + 1, ii) = b(2, ii) Next Next .Value = b End With End Sub
Sub J3v16() Dim Fnd1 As Range, Fnd2 As Range, Rng As Range, i As Long For i = 4 To 10 Set Fnd1 = Range("AS" & i & ":AZ" & i).Find("*", , xlValues, xlWhole) If Not Fnd1 Is Nothing Then Set Fnd2 = Range(Cells(i, Fnd1.Column + 1), Cells(i, 52)).Find("*", , xlValues, xlWhole) If Not Fnd2 Is Nothing Then Set Rng = Range(Cells(i, Fnd1.Column + 1), Cells(i, Fnd2.Column - 1)) If Application.CountBlank(Rng) > 0 Then Rng.Value = "x" End If End If Next i End Sub
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks