lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
The vlookup = =VLOOKUP(B2,$H$2:$I$5,2,1) with approximate values is working if the table like this
This table start H2:I5
[TABLE="class: grid, width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD="align: right"]50[/TD]
[TD]c[/TD]
[/TR]
[TR]
[TD="align: right"]60[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD="align: right"]80[/TD]
[TD]a[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD="align: right"]91[/TD]
[TD]a[/TD]
[/TR]
[TR]
[TD]mary2[/TD]
[TD="align: right"]40[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary3[/TD]
[TD="align: right"]12[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary4[/TD]
[TD="align: right"]76[/TD]
[TD]b[/TD]
[/TR]
</tbody>[/TABLE]
but is I change the table above to
[TABLE="class: grid, width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD="align: right"]80[/TD]
[TD]a[/TD]
[/TR]
[TR]
[TD="align: right"]60[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD="align: right"]50[/TD]
[TD]c[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD]f[/TD]
[/TR]
</tbody>[/TABLE]
then I get wrong answers
[TABLE="class: grid, width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD="align: right"]91[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary2[/TD]
[TD="align: right"]40[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD]mary3[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD]mary4[/TD]
[TD="align: right"]76[/TD]
[TD]f[/TD]
[/TR]
</tbody>[/TABLE]
Why is that? Thank you so much.
The vlookup = =VLOOKUP(B2,$H$2:$I$5,2,1) with approximate values is working if the table like this
This table start H2:I5
[TABLE="class: grid, width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD="align: right"]50[/TD]
[TD]c[/TD]
[/TR]
[TR]
[TD="align: right"]60[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD="align: right"]80[/TD]
[TD]a[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD="align: right"]91[/TD]
[TD]a[/TD]
[/TR]
[TR]
[TD]mary2[/TD]
[TD="align: right"]40[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary3[/TD]
[TD="align: right"]12[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary4[/TD]
[TD="align: right"]76[/TD]
[TD]b[/TD]
[/TR]
</tbody>[/TABLE]
but is I change the table above to
[TABLE="class: grid, width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD="align: right"]80[/TD]
[TD]a[/TD]
[/TR]
[TR]
[TD="align: right"]60[/TD]
[TD]b[/TD]
[/TR]
[TR]
[TD="align: right"]50[/TD]
[TD]c[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD]f[/TD]
[/TR]
</tbody>[/TABLE]
then I get wrong answers
[TABLE="class: grid, width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]name[/TD]
[TD="width: 64"]average[/TD]
[TD="width: 64"]grade[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD="align: right"]91[/TD]
[TD]f[/TD]
[/TR]
[TR]
[TD]mary2[/TD]
[TD="align: right"]40[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD]mary3[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD]mary4[/TD]
[TD="align: right"]76[/TD]
[TD]f[/TD]
[/TR]
</tbody>[/TABLE]
Why is that? Thank you so much.