Be specific about the range to sort--exclude the columns that should not be
sorted from the range to be sorted.
The range to sort must be contiguous, though.
dim wks as worksheet
dim rng as range
set wks = worksheets("Protected")
with wks
.unprotect password:="Hi"
set rng = .range("d3:g" & .cells(.rows.count,"D").end(xlup).row)
with rng
.sort key1:=.columns(3), order1:=xlascending, header:=true
end with
.protect password:="Hi"
end with
===
Untested and uncompiled--watch for typos.
I sorted D3:G (lastrow in column D). and avoided all the other cells.