I currently have this code which puts an X in a selected range based on a COUNTIF Formula. I would like these Xs to be centered in the cells
Currently I have tried: Rng.HorizontalAlignment = xlCenter
Thank you for the help in advance!
VBA Code:
Set Rng = Range(Cells(r + 1, "C"), Cells(r + counter, "C"))
Cells(r, "C").Formula = "=IF(COUNTIF(" & Rng.Address(0, 0) & ", ""X""), ""X"", "" "")"
Cells(r, "C").Copy Range(Cells(r, "D"), Cells(r, lc))
Application.CutCopyMode = False
Currently I have tried: Rng.HorizontalAlignment = xlCenter
Thank you for the help in advance!