Welcome to the forum.

Try this:
Sub x()
    Dim cell As Range
    
    For Each cell In Intersect(ActiveSheet.UsedRange, Columns("P"))
        If cell.Value = 1 Then Range(Cells(cell.Row, "Q"), Cells(cell.Row, "AB")).ClearContents
    Next cell
End Sub