I want to center a few cells, but my sytax is not correct with the cells
function. Here is what I have. Thanks for the help

cells(3,columnnum:columnnum+2).HorizontalAlignment = xlCenterAcrossSelection

I cannot use the range funtion since my row value is a variable.