How can I put a formula into every other row tia sal2

T

temp

Greetings all

I'm trying to get excel to calculate a formula for every other row is this
possible.

Example:
Column A1-A9 has 1 thru 9 in it.
Column C1 has the formula A1+3 and I would like that formula to be in every
other row of C. So C1 would be A1+3 ,C2 would be blank, C3 would be A2+3,
C4 would be blank, C5 would be A3+3 and so on.

Is this possible?
tia sal2
 
D

Don Guillett

Sub altrowformula()
For i = 2 To 12 Step 2
Cells(i, "H").Formula = "=a" & i / 2 & "+3"
Next i
End Sub
 
R

RagDyer

Enter this formula in C1:
=INDEX(A:A,ROWS($1:2)/2)+3

And enter this formula in C3:
=INDEX(A:A,ROWS($1:4)/2)+3

NOW ... Select C1 to *C4*,
Click on the fill handle of the *selected 4 cells*,
And drag down to copy as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top