I just started working VBA on a project within the last couple of months, and I'm stuck on [what feels like] a pretty advanced problem set where I need to iterate though each row within a table ("DataTable") and leverage different data points across columns to:
1). Locate worksheet.name ("A:A" / "Quarter Schedule");
2.) Identify the intersect ("B:B / "Range ID" & "D:D" / "Start Date") within worksheet.name ("A:A" / "Quarter Schedule");
3.) Merge intersect location by ("F:F" / "Total Days") number of cells;
4.) Attach text ("C:C" / "Status Detail") to the new range of merged cells


Current Code:
Sub FindCellLocations()
Application.ScreenUpdating = False
Dim FoundCol As Range
Dim FoundRow As Range
Set FoundCol = Range("6:6").Find(what:=Sheets("Data Table").Range("DataTable[Start Date]").Value, LookIn:=xlFormulas)
Set FoundRow = Range("A:A").Find(what:=Sheets("Data Table").Range("DataTable[Range ID]").Value)
Set x = Intersect(FoundCol.EntireColumn, FoundRow.EntireRow)
If x Is Nothing Then
MsgBox "Ranges don't intersect"
Else
With x.Resize(, 3)
.Merge Across:=True
.Value = Sheets("Data Table").Range("DataTable[Status Detail]").Value
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Interior.Color = vbYellow
End With
End If
End Sub
I can't figure out the loop or the merge portion; any help would be greatly appreciated!
Microsoft documentation: