Hello there!
I want it so that when I copy down a formula it with cell references in it, it changes the colulm not the row
e.g.
A4
B4
C4
D4
Rather than
A4
A5
A6
A7
Thanks very much!!
Alex
Hello there!
I want it so that when I copy down a formula it with cell references in it, it changes the colulm not the row
e.g.
A4
B4
C4
D4
Rather than
A4
A5
A6
A7
Thanks very much!!
Alex
=ADDRESS(4,ROW())
If it's referencing the incorrect column, add a + or - value after the 'row()' text.
e.g.
=ADDRESS(4,ROW()+2)
=ADDRESS(4,ROW()-3)
Thanks for that though it doesn't seem to do quite what I'm after - here is the whole formula:
=AVERAGEIF('Company Footprint'!E5:'Company Footprint'!E245,1,Country_Risk!$E$4:$E$245)
I want it to copy down as follows:
=AVERAGEIF('Company Footprint'!F5:'Company Footprint'!F245,1,Country_Risk!$E$4:$E$245)
=AVERAGEIF('Company Footprint'!G5:'Company Footprint'!G245,1,Country_Risk!$E$4:$E$245)
=AVERAGEIF('Company Footprint'!H5:'Company Footprint'!H245,1,Country_Risk!$E$4:$E$245)
=AVERAGEIF('Company Footprint'!I5:'Company Footprint'!I245,1,Country_Risk!$E$4:$E$245)
THANK YOU!
Alex
In that case...
=AVERAGEIF(INDIRECT("'Company Footprint'!"&ADDRESS(5,ROW())&":'Company Footprint'!"&ADDRESS(245,ROW())),1,Country_Risk!$E$4:$E$245)
Again, bear in mind this formula uses the row number to get the required column, so if you put this formula in row 6 it'd be the equivalent of F5/245, row 9 would be I5/245, etc.
If you needed row 2 to look in column F, you would need to adjust the row() references accordingly - i.e row()+4.
Similarly, if any rows are subsequently added in above the data, you would need to adjust the row() value accordingly.
you can use an index in average if
=AVERAGEIF(INDEX('Company Footprint'!$F$4:$M$245,,ROW(A1)),1,Country_Risk!$E$4:$N$245)
as you drag that down row(a1) will change to row(a2)
so changing the column its looking at in the index row(a1)=1 =ist col of index ie col f
row(a2)=2 2nd col of index ie =col g and so on this would go up to row(a7) col m in this case
Last edited by martindwilson; 02-09-2011 at 11:42 AM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks