Dividing multiple cells using Vlookup function

agerrard

Active Member
Joined
Apr 4, 2005
Messages
406
Hi everone,

Im using excel 2003 SP2 on Windows XP. In the below example i currently have a calculation set up to determine relativity between 2 markets (see H13:I17) this is working fine as the order in the data dump (i.e. the order of the products) does not change.

But from now on the order of the products will change so i have to search using vlookup. I've been struggling with the vlookup however, as i cant get it to give me a number (it always returns #N/A).

So in H13 is want to write:

=if(iserror(vlookup(b13,d13:d17,1,false)/(vlookup(b13,c13:c17,1,false)/vlookup(b13,d4:d8,1,false)/(vlookup(b13,c4:c8,1,false)),0,vlookup(b13,d13:d17,1,false)/(vlookup(b13,c13:c17,1,false)/vlookup(b13,d4:d8,1,false)/(vlookup(b13,c4:c8,1,false))

but this isnt working...

Any ideas please?
mr excel_1.xls
ABCDEFGHI
1
2MATToSep06QTRToSep07
3Units(000)Dollars(000)Units(000)Dollars(000)
4MarketAProduct1200.0$1,200.050.0$300.0
5Product2300.0$1,450.075.0$362.5
6Product3400.0$1,600.0100.0$400.0
7Product4500.0$1,890.0125.0$472.5
8Product5600.0$2,500.0150.0$625.0
9
10
11MATToSep06QTRToSep07
12Units(000)Dollars(000)Units(000)Dollars(000)MATRelativityQTRRelativity
13MarketBProduct1450.0$2,000.0112.5$500.074.174.1
14Product2550.0$2,560.0137.5$640.096.396.3
15Product3650.0$2,700.0162.5$675.0103.8103.8
16Product4750.0$2,900.0187.5$725.0102.3102.3
17Product5900.0$3,500.0225.0$875.093.393.3
Sheet1
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
So in H13 is want to write:

=if(iserror(vlookup(b13,d13:d17,1,false)/(vlookup(b13,c13:c17,1,false)/vlookup(b13,d4:d8,1,false)/(vlookup(b13,c4:c8,1,false)),0,vlookup(b13,d13:d17,1,false)/(vlookup(b13,c13:c17,1,false)/vlookup(b13,d4:d8,1,false)/(vlookup(b13,c4:c8,1,false))

but this isnt working...

Any ideas please?

The problem is with the tables in your lookup must include the lookup reference as well as in the defined table so try this

=if(iserror(vlookup($b13,$B$13:$D$17,3,false)/(vlookup($b13,$B$13:$D$17,2,false)/vlookup($b13,$B$4:$D$8,3,false)/(vlookup($b13,$B$4:$D$8,2,false)),0,vlookup(vlookup($b13,$B$13:$D$17,3,false)/(vlookup($b13,$B$13:$D$17,2,false)/vlookup($b13,$B$4:$D$8,3,false)/(vlookup($b13,$B$4:$D$8,2,false))

Hope this helps (also need absolute ref eg "$" to keep tables absolute when copying formulas down.
 
Upvote 0
I have split this up in two parts.

1) locate the row the produce is on in Market1

2) using that row, then calculate the MAT Relativity

In A13 Place:

=MATCH(B13,$B$1:$B$8,0)

and Fill A13:A17

In H13 Place:

=IF(ISERROR(A13),0,(D13/C13)/(INDIRECT("D"&A13)/INDIRECT("C"&A13)))*100

and Fill H13:H17
 
Upvote 0

Forum statistics

Threads
1,222,710
Messages
6,167,780
Members
452,141
Latest member
beraned1218

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top