Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Formula Cell References Change When Sorting After Filtering

$
0
0

Morning everyone,

I have two worksheets, parts of which i've included below. In Worksheet A a profile code is entered into the 'Profile' column and a millimetre width is entered into the 'Width' column. I need a formula to be entered into the 'Manufacturing Code' column which would access the table shown in Worksheet B, cross-referencing the profile code and the width entered to give the manufacturing code.

Worksheet A

Due Date Order Number Profile Width Depth Ring Size ID (mm) Manufacturing Code
1/11/14 12456 WCAXL 3.02 S 19.25
2/11/14 12365 WCAL 7.02 U 19.95
9/11/14 12456 WCAH 4.02 W 20.75

Worksheet B

2.02 2.52 3.02 3.52 4.02 5.02 6.02 7.02 8.02
WCAXL 49 50 51 51 52 53 54 55 56
WCAL 49 50 51 51 52 53 54 55 56
WCAM 57 58 59 59 60 61 62 63 64
WCAH 65 66 67 67 68 69 70 71 72

Upon seeking help before I have arrived on the formula shown below:

=INDEX(wsB!$B$2:$J$5,MATCH(wsA!$C2,wsB!$A$2:$A$5,0),MATCH(wsA!$D2,wsB!$B$1:$J$1,0))

This works exactly how I'd want it to, right up until I need to sort any of the columns. Then, the two cell references wsA!$C2 and wsA!$D2 do not change correctly relative to the row the formula is now in after the sort. I can see from this site and others that this is a common issue with Excel '07?

Does anyone know of a way around this?

Thanks a lot,

Rob Mitchell


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>