ranges vs. entire worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I'm looking to solve a problem with selecting a specific range or ranges as opposed to an entire worksheet. I'm formatting numbers to the nearest 1/2 decimal place, but only for a specific range, i.e., D1:F1, etc. I've tried a With.... End With statement as well as For...Next loops, but I think at this point I'm barking up the wrong tree with that kind of logic

Any assistance/information is appreciated. Thanks in advance

fjm
 
Hi Frank
not quite sure what you're trying to do but maybe you're looking for
something like the following:

Dim rng as range
dim cell as range
set rng = activesheet.range("D1:F10")
for each cell in rng
cell.value = Round(cell.value*2,0)/2
next
 
Back
Top