# loop through even numbers.

#### shahdelsol

##### Active Member
For simple loop like For i = 12 to 82 , how do I make it to loop through even numbers and skip odd numbers meaning go through only 12,14,16, etc. Thanks

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

##### Well-known Member
for i = 12 to 82 step 2

#### shahdelsol

##### Active Member
Thank you! And does that mean for odd numbers I should say step 1?
for i = 12 to 82 step 2

#### L. Howard

##### Well-known Member
Seems you would do this for ODD. Untested.

for i = 11 to 81 step 2

Howard

#### shahdelsol

##### Active Member
Aha that makes sense. Thanks

Replies
1
Views
392
Replies
16
Views
3K
Replies
14
Views
596
Replies
1
Views
271
Replies
8
Views
357

1,195,702
Messages
6,011,200
Members
441,594
Latest member
AVO

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back