Fill up a column based on some difficult criterias

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
My data is like:


LHLILJLKLLLMLNLOLPLQ
Table 3

<tbody>
[TD="bgcolor: #cacaca, align: center"]50[/TD]
[TD="colspan: 4, align: center"]Table 1[/TD]
[TD="colspan: 4, align: center"]Table2[/TD]

[TD="bgcolor: #ffff00"]B[/TD]

[TD="bgcolor: #cacaca, align: center"]53[/TD]
[TD="align: right"]281.60[/TD]
[TD="align: right"]284.75[/TD]
[TD="align: right"]285.00[/TD]
[TD="align: right"]290.75[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="bgcolor: #ffff00, align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]284.75[/TD]

[TD="bgcolor: #cacaca, align: center"]54[/TD]
[TD="align: right"]307.30[/TD]
[TD="align: right"]311.35[/TD]
[TD="align: right"]312.00[/TD]
[TD="align: right"]312.90[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]55[/TD]
[TD="align: right"]307.30[/TD]
[TD="align: right"]311.35[/TD]
[TD="align: right"]312.00[/TD]
[TD="align: right"]312.90[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]B[/TD]
[TD="bgcolor: #ffff00, align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]312.90[/TD]

[TD="bgcolor: #cacaca, align: center"]56[/TD]
[TD="align: right"]156.30[/TD]
[TD="align: right"]158.35[/TD]
[TD="align: right"]158.80[/TD]
[TD="align: right"]163.20[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]57[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]

[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]58[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]

[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]59[/TD]
[TD="align: right"]295.65[/TD]
[TD="align: right"]301.55[/TD]
[TD="align: right"]303.35[/TD]
[TD="align: right"]312.50[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="bgcolor: #ffff00, align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]295.65[/TD]

[TD="bgcolor: #cacaca, align: center"]60[/TD]
[TD="align: right"]166.20[/TD]
[TD="align: right"]169.00[/TD]
[TD="align: right"]169.30[/TD]
[TD="align: right"]176.35[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]61[/TD]
[TD="align: right"]201.20[/TD]
[TD="align: right"]205.60[/TD]
[TD="align: right"]206.00[/TD]
[TD="align: right"]214.60[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]C[/TD]
[TD="align: right"]100[/TD]

[TD="bgcolor: #cacaca, align: center"]62[/TD]
[TD="align: right"]579.60[/TD]
[TD="align: right"]579.60[/TD]
[TD="align: right"]581.90[/TD]
[TD="align: right"]587.55[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]B[/TD]
[TD="bgcolor: #ffff00, align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]587.55[/TD]

</tbody>

Requirement: Table 3 LP53:LP62 needs to be filled with values of Table 1
Criteria:
(1) MATCH LQ50 with Table 2 & pull corresponding cell position from Table 1
(2) IF Corresponding cell address of LP53:LP62 contains 200 then LQ53:LQ62=Table 1

Example:
LQ50=B
Table 2: B is in LM53 which is 2nd column of Table 2. So get 2nd column from Table 1 i.e. LI53 (284.85)
LP53=200 so LQ53=284.75

Similarly, LQ54:LQ62 needs to be filled.
Formula required for LQ53:LQ62
How to accomplish?
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
If Table3 is not 200,column LQ is blank.
Hope this helps.
LQ53=IF(LP53=200,INDEX($LH53:$LK53,1,MATCH($LR$50,$LL53:$LO53,0)),"")
 
Upvote 0
If Table3 is not 200,column LQ is blank.
Hope this helps.
LQ53=IF(LP53=200,INDEX($LH53:$LK53,1,MATCH($LR$50,$LL53:$LO53,0)),"")

It WORKS. Thanks Takae. I changed $LR$50 to $LQ$50
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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