Copying repeating formulae down but only incrementing singly

WayneSav

New Member
Joined
Mar 12, 2025
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a formula in one cell which is referencing a value in a single cell. The same formula is in the cell below (referencing the same cell). Formula is

=IF(H1>0,"I",IF(H1<0,"C",""))

and this is in cells A1 and A2. I want to copy it down for all values in column H but repeating over the 2 rows, i.e. formula in A3 and A4 are =IF(H2>0,"I",IF(H2<0,"C",""))
Is there an easy way to copy down for all values in H?
 
Hi & welcome to MrExcel.
How about
Excel Formula:
=LET(a,INDEX(H:H,CEILING.MATH(ROW(A1)/2,1)),IF(a>0,"I",IF(a<0,"C","")))
 
Upvote 0
Solution
The key issue is that you need to figure out a formula that returns 1 for rows 1 and 2, 2 for rows 3 and 4, and so on. Then, use the INDEX function to retrieve the corresponding value from column H.

At row 1, the INT function will help: cell A1
INT((ROWS($1:1)-1)/2)+1

Then, using INDEX:
INDEX(H:H, INT((ROWS($1:1)-1)/2)+1)
This will return the value from column H (let's call it value).

After that, you could use IF to determine the result. However, since value might be lengthy and make the formula cumbersome, there's a more concise way using LOOKUP:

=LOOKUP(INDEX(H:H, INT((ROWS($1:1)-1)/2)+1), {-1000, 0, 0.000001}, {"C", "", "I"})
This formula will:

  • Return "C" if value is between -1000 and 0 (the number -1000 can be adjusted to cover all possible negative values in your data).
  • Return "" (empty) if value is between 0 and 0.000001 (meaning it equals 0).
  • Return "I" if value is greater than 0.
Book1
ABCDEFGH
1I12
2I0
3 -5
4 6
5C
6C
7I
8I
9
10
Sheet1
Cell Formulas
RangeFormula
A1:A8A1=LOOKUP(INDEX(H:H,INT((ROWS($1:1)-1)/2)+1),{-1000,0,0.000001},{"C","","I"})
 
Upvote 0
The key issue is that you need to figure out a formula that returns 1 for rows 1 and 2, 2 for rows 3 and 4, and so on. Then, use the INDEX function to retrieve the corresponding value from column H.

At row 1, the INT function will help: cell A1
INT((ROWS($1:1)-1)/2)+1

Then, using INDEX:
INDEX(H:H, INT((ROWS($1:1)-1)/2)+1)
This will return the value from column H (let's call it value).

After that, you could use IF to determine the result. However, since value might be lengthy and make the formula cumbersome, there's a more concise way using LOOKUP:

=LOOKUP(INDEX(H:H, INT((ROWS($1:1)-1)/2)+1), {-1000, 0, 0.000001}, {"C", "", "I"})
This formula will:

  • Return "C" if value is between -1000 and 0 (the number -1000 can be adjusted to cover all possible negative values in your data).
  • Return "" (empty) if value is between 0 and 0.000001 (meaning it equals 0).
  • Return "I" if value is greater than 0.
Book1
ABCDEFGH
1I12
2I0
3 -5
4 6
5C
6C
7I
8I
9
10
Sheet1
Cell Formulas
RangeFormula
A1:A8A1=LOOKUP(INDEX(H:H,INT((ROWS($1:1)-1)/2)+1),{-1000,0,0.000001},{"C","","I"})
Thanks Bebo021999
 
Upvote 0

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top