Finding Values in a Table

markhib

New Member
Joined
Apr 21, 2008
Messages
19
Hi There,

Please help!

i have a table set out as follows,

[TABLE="width: 480"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD] Age of Debt[/TD]
[TD]Business[/TD]
[TD]Person[/TD]
[TD]Govt[/TD]
[TD]Other[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Current[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]5%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Up to 30 days overdue[/TD]
[TD]10%[/TD]
[TD]5%[/TD]
[TD]5%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]31 - 60 days overdue[/TD]
[TD]20%[/TD]
[TD]5%[/TD]
[TD]20%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]61 - 90 days overdue[/TD]
[TD]30%[/TD]
[TD]15%[/TD]
[TD]20%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]91 - 120 days overdue[/TD]
[TD]40%[/TD]
[TD]15%[/TD]
[TD]20%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]121 - 150 days overdue[/TD]
[TD]50%[/TD]
[TD]15%[/TD]
[TD]20%[/TD]
[TD]0%[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]151 - 180 days overdue[/TD]
[TD]60%[/TD]
[TD]45%[/TD]
[TD]20%[/TD]
[TD]50%
[/TD]
[/TR]
</tbody>[/TABLE]


In a seperate sheet i have a bunch of outstanding transactions and want to apply the correct rate dependant on wether the entity is a Business, Person, Gov or Other and the age of the Debt is Current, 30 days etc etc.

I thought about if statements but too many possibilities, Ive tried concatenating age and entity and creating a list to do a vlook up but am sure there is a better way..

Many Thanks

MArk
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
one way

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][th]
G
[/th][th]
H
[/th][th]
I
[/th][th]
J
[/th][th]
K
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]overdue[/td][td]Business[/td][td]Person[/td][td]Govt[/td][td]Other[/td][td][/td][td][/td][td]overdue[/td][td]who ?[/td][td][/td][td] formula in J2[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]
180
[/td][td]
60%​
[/td][td]
45%​
[/td][td]
20%​
[/td][td]
50%​
[/td][td][/td][td][/td][td]
125​
[/td][td]Business[/td][td]
50%​
[/td][td] =INDEX($B$2:$E$8,MATCH(H2,$A$2:$A$8,-1),MATCH(I2,$B$1:$E$1,0))[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]
150
[/td][td]
50%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]
120
[/td][td]
40%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]
90
[/td][td]
30%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]
60
[/td][td]
20%​
[/td][td]
5%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]
30
[/td][td]
10%​
[/td][td]
5%​
[/td][td]
5%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td]
0
[/td][td]
0%​
[/td][td]
0%​
[/td][td]
5%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet2[/td][/tr][/table]
 
Upvote 0
you probably need a catch-all row

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][th]
G
[/th][th]
H
[/th][th]
I
[/th][th]
J
[/th][th]
K
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]overdue[/td][td]Business[/td][td]Person[/td][td]Govt[/td][td]Other[/td][td][/td][td][/td][td]overdue[/td][td]who ?[/td][td][/td][td] formula in J2 copied down[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]
9999
[/td][td]
666%​
[/td][td=bgcolor:#FFFF00]
666%​
[/td][td]
666%​
[/td][td]
50%​
[/td][td][/td][td][/td][td]
125​
[/td][td]Business[/td][td]
50%​
[/td][td] =INDEX($B$2:$E$9,MATCH(H2,$A$2:$A$9,-1),MATCH(I2,$B$1:$E$1,0))[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]
180
[/td][td]
60%​
[/td][td]
45%​
[/td][td]
20%​
[/td][td]
50%​
[/td][td][/td][td][/td][td]
500​
[/td][td]Person[/td][td]
666%​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]
150
[/td][td=bgcolor:#FFFF00]
50%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td]
25%​
[/td][td]Govt[/td][td]
5%​
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]
120
[/td][td]
40%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]
90
[/td][td]
30%​
[/td][td]
15%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]
60
[/td][td]
20%​
[/td][td]
5%​
[/td][td]
20%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td]
30
[/td][td]
10%​
[/td][td]
5%​
[/td][td=bgcolor:#FFFF00]
5%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
9
[/td][td]
0
[/td][td]
0%​
[/td][td]
0%​
[/td][td]
5%​
[/td][td]
0%​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet2[/td][/tr][/table]
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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