Scott McDaniel (EE MVE )
asked on
Maintaining References in Excel Formulas
In my Excel worksheet, I have a formula that looks like this:
=IF(P25=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P2 5,AH4:AH7, AJ4:AJ7))
I've copied it to about 8 new rows, and changed the relevant references to point to the appropriate rows, so I now have this:
=IF(P26=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P2 5,AH4:AH7, AJ4:AJ7))
=IF(P27=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P2 7,AH4:AH7, AJ4:AJ7))
=IF(P28=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P2 8,AH4:AH7, AJ4:AJ7))
=IF(P29=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P2 9,AH4:AH7, AJ4:AJ7))
=IF(P30=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7) ,LOOKUP(P3 0,AH4:AH7, AJ4:AJ7))
Those forumlas work, and leave the "hard" values of B6, and the Lookup criteria where they need to be. When I select and drag to copy, however, Excel changes the relative values to match the new rows, so I end up with this:
=IF(P32=1, LOOKUP(B13,AH11:AH14,AJ11: AJ14),LOOK UP(P32,AH1 1:AH14,AJ1 1:AJ14))
=IF(P33=1, LOOKUP(B13,AH11:AH14,AJ11: AJ14),LOOK UP(P33,AH1 1:AH14,AJ1 1:AJ14))
=IF(P34=1, LOOKUP(B13,AH11:AH14,AJ11: AJ14),LOOK UP(P34,AH1 1:AH14,AJ1 1:AJ14))
and so on - the drag/copy doesn't maintain my lookup references.
Is there some way to tell Excel to copy my formulas down differently, to maintain my lookup values better? I can do a Find/Replace, but it's a painful process, and for an upcoming project I'm going to have to build quite a few formulas that would be similar
=IF(P25=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
I've copied it to about 8 new rows, and changed the relevant references to point to the appropriate rows, so I now have this:
=IF(P26=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
=IF(P27=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
=IF(P28=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
=IF(P29=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
=IF(P30=1, LOOKUP(B6,AH4:AH7,AJ4:AJ7)
Those forumlas work, and leave the "hard" values of B6, and the Lookup criteria where they need to be. When I select and drag to copy, however, Excel changes the relative values to match the new rows, so I end up with this:
=IF(P32=1, LOOKUP(B13,AH11:AH14,AJ11:
=IF(P33=1, LOOKUP(B13,AH11:AH14,AJ11:
=IF(P34=1, LOOKUP(B13,AH11:AH14,AJ11:
and so on - the drag/copy doesn't maintain my lookup references.
Is there some way to tell Excel to copy my formulas down differently, to maintain my lookup values better? I can do a Find/Replace, but it's a painful process, and for an upcoming project I'm going to have to build quite a few formulas that would be similar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.