Forum Discussion
Using IF command but referencing alternate rows - autofill
Hi,
Please can some help me.
How do I continue this sequence without having to manually adjust each equation?
=IF($C6=$H$5,$D6," ")
=IF($C8=$H$5,$D8," ")
=IF($C10=$H$5,$D10," ")
=IF($C12=$H$5,$D12," ")
I want to reference data from alternate rows in a table of data.
If I just use the Autofill, the sequence does not work out right.
Please see example attached.
(Red and White are referencing the alternate orange rows, while Green/Blue are looking at the white rows)
thanks
James
- JKPieterseSilver Contributor
Two options:
1. An array formula (enter using control+shift+enter!)
2. A pivot table.
See attached.
Jan,
As third option here is slight modification of your formula to avoid using array formulas
=IFERROR(INDEX($D$5:$D$16,MATCH(1,INDEX(($G26=$B$5:$B$16)*(H$25=$C$5:$C$16),0,1),0)),"")
and attached
- James DiaperCopper Contributor
Wow Jan, you are amazing!
I was having problems using the array formulas but this works perfectly.
thank you so much.
- James DiaperCopper Contributor
Thank you very much Jan :)