Copy Formula Question

P

phowe43

As reference, here is the formula I am working with;

=IF(A8='Master Data'!D2,'Master Data'!E2,IF(A8='Master Data'!D3,'Master
Data'!E3,IF(A8='Master Data'!D4,'Master Data'!E4,IF(A8='Master
Data'!D5,'Master Data'!E5,IF(A8='Master Data'!D6,'Master
Data'!E6,IF(A8='Master Data'!D7,'Master Data'!E7,IF(A8='Master
Data'!D8,'Master Data'!E8)))))))

The 'Master Data'! D2 - E2, E3 - E4 and so on...are based on a table that I
built on a separate worksheet. This formula is located in cell C8. When I
copy the cell and paste it to cell C20, my formula looks like;

=IF(A20='Master Data'!D14,'Master Data'!E14,IF(A20='Master Data'!D15,'Master
Data'!E15,IF(A20='Master Data'!D16,'Master Data'!E16,IF(A20='Master
Data'!D17,'Master Data'!E17,IF(A20='Master Data'!D18,'Master
Data'!E18,IF(A20='Master Data'!D19,'Master Data'!E19,IF(A20='Master
Data'!D20,'Master Data'!E20)))))))

While the A20 in the formula is good...I need 'Master Data'!D2 instead of
'Master Data'D14.

Are you confused yet?
 
A

akphidelt

Put $ signs next to anything you want to remain constant.

Like $D$2 keeps D2 in every formula

$D2 Keeps the column D in every formula but changes the row
D$2 Keeps row 2 in every formula but changes the column
 
I

iliace

If you don't want the column reference to change, add a $ in front of
it. Same for row reference. So, something like this should work:

=IF(A8='Master Data'!$D$2,'Master Data'!$E$2,IF($A$8='Master Data'!$D
$3,'Master
Data'!$E$3,IF($A$8='Master Data'!$D$4,'Master Data'!$E$4,IF($A
$8='Master
Data'!$D$5,'Master Data'!$E$5,IF($A$8='Master Data'!$D$6,'Master
Data'!$E$6,IF($A$8='Master Data'!$D$7,'Master Data'!E7,IF($A$8='Master
Data'!$D$8,'Master Data'!$E$8)))))))
 

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