Difference between revisions of "Manuals/calci/VLOOKUP"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''VLOOKUP'''</font></font></font><font color="#484...")
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''VLOOKUP'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''lkup_val'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''tb_arr'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''c_index_n'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,range_lk)</font></font></font>
+
<div style="font-size:30px">'''VLOOKUP (Value,Array,Column,ApproximateMatchFlag) '''</div><br/>
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''where lkup_val is t'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">he value to search in the first column of the table </font></font></font>[javascript:AppendPopup(this,'xldefArray_1') <font color="#000000"><font face="Arial, sans-serif"><font size="2">array</font></font></font>][javascript:AppendPopup(this,'xldefArray_1') <font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font>]
+
where,
 +
*'''Value''' is the value to be matched from an array or first column of the table,
 +
*'''Array''' refers to two or more columns of data values,
 +
*'''Column''' is the column number in the table from which the matching value should be returned, and
 +
*'''ApproximateMatchFlag''' is an optional logical value that specifies whether to find an exact match or approximate match of the mentioned lookup value.
 +
**VLOOKUP(), looks in the first column of an array and moves across the row to return the value of a cell.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">tb_arr is the two or more columns of data,</font></font></font>
+
== Description ==
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">c_index_n is the column number in table_array from which the matching value must be returned and </font></font></font>
+
VLOOKUP (Value,Array,Column,ApproximateMatchFlag)
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">range_lk is a logical value that specifies whether one should want VLOOKUP to find an exact match or an approximate match:</font></font></font>
+
*The 'V' in VLOOKUP stands for vertical. This function looks the value column wise.
 +
*Arguments containing text values entered as a part of command, should be enclosed in quotes (e.g. "JOHN").
  
</div>
+
*VLOOKUP function is not case-sensitive.
----
+
*If '''Value''' is less than 'smallest value in first column of table', Calci displays #NULL error message.
<div id="1SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">IT searches for a value in the first column of a table array and gives a value in the same row from another column in the table array. </font></font></font></div>
+
*If '''Column''' is 1, Calci returns the value from the first column in table array. If '''column_index_num''' is 2, Calci returns the value from the second column in table array and so on.
----
+
*For '''Column''' &lt; 1 or '''Column''' &gt; 'number of columns in array', Calci returns #NULL error message.
<div id="7SpaceContent" class="zcontent" align="left"> 
+
*The values in first column should be arranged in ascending order for correct results.
 +
*Argument '''ApproximateMatchFlag''' can be TRUE or FALSE.
 +
*If '''ApproximateMatchFlag''' is TRUE or Omitted, Calci returns exact or approximate match of the value.
 +
*Approximate value is the largest value that is &lt;= '''lkup_val'''.
 +
*If '''ApproximateMatchFlag''' is FALSE, Calci searches only for the exact match. If exact match is not found, Calci returns #NULL error message.
 +
*For invalid arguments, Calci displays #NULL error message.
  
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">ODDFYIELD shows the error value, when 'settle', 'M', 'I', or 'FC' is not a valid date or 'R' or 'Yield' &lt; 0.</font></font></font>
+
== Examples ==
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">Basis must be between 0 and 4. </font></font></font>
+
Following table shows the use of VLOOKUP function -
 +
<div id="2SpaceContent" class="zcontent" align="left">
  
* <font color="#000000"><font face="Arial, sans-serif"><font size="2">M &gt;FC &gt; settle &gt; I</font></font></font>
+
{| id="TABLE3" class="SpreadSheet blue"
 +
|- class="even"
 +
| class="sshl_f" |'''Number'''
 +
| class=" " |'''Square'''
 +
| class=" " |'''Cube'''
  
<br /><br />
+
|- class="odd"
 +
| class="sshl_f" |1
 +
| class=" " |1
 +
| class=" " |1
  
</div>
+
|- class="even"
----
+
| class="sshl_f" |2
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
+
| class=" " |4
 +
| class=" " |8
  
VLOOKUP
+
|- class="odd"
 +
| class="sshl_f" |3
 +
| class=" " |9
 +
| class=" " |27
  
</div></div>
+
|- class="even"
----
+
| class="sshl_f" |4
<div id="8SpaceContent" class="zcontent" align="left"
+
| class=" " |16
 +
| class=" " |64
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example</font></font></font>
+
|- class="odd"
 +
| class="sshl_f" |5
 +
| class=" " |25
 +
| class=" " |125
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">C1 C2 C3</font></font></font>]
+
|- class="even"
 
+
| class="sshl_f" |6
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R1 0.327 4.52 600</font></font></font>]
+
| class=" " |36
 
+
| class=" " |216
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R2 .423 4.21 500</font></font></font>]
+
|}
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R3 0.517 3.87 400</font></font></font>]
+
=VLOOKUP(3,A2:C7,2) : Looks up for '3' in Number Column and returns value from Square column <br />in the same row. Returns '''9''' as a result.
 +
=VLOOKUP(5,A2:C7,3,FALSE) : Looks up for exact match for '5' in Number Column and returns value from <br />Cube column in the same row. Returns '''125''' as a result.
 +
=VLOOKUP(5.5,A2:C7,2,TRUE) : Looks up for approximate match for '5.5' in Number Column, <br />matches the nearest value '5' and returns value from Square column in same row. <br />Returns '''25''' as a result.
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R4 0.574 3.15 300</font></font></font>]
+
==Related Videos==
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R5 0.643 2.98 200</font></font></font>]
+
{{#ev:youtube|GZX2iXfqALs|280|center|VLOOKUP}}
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R6 0.711 2.75 150</font></font></font>]
+
== See Also ==
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R7 0.857 2.5 100</font></font></font>]
+
*[[Manuals/calci/LOOKUP | LOOKUP]]
 +
*[[Manuals/calci/HLOOKUP | HLOOKUP]]
 +
*[[Manuals/calci/MATCH | MATCH]]
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R8 2.04 .0.987 50</font></font></font>]
+
== References ==
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2">R9 2.18 0.975 0</font></font></font>]
+
*[http://en.wikipedia.org/wiki/Lookup_table#VLOOKUP VLOOKUP]
 +
*[http://en.wikipedia.org/wiki/Comparison_of_programming_languages_(string_functions)#Find Find String]
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#666666"><font face="Arial, sans-serif"><font size="2"><nowiki>=VLOOKUP(1,C1R1:C3R9,2) is 2.5</nowiki></font></font></font>]
 
  
[javascript:ToggleDiv('divExpCollAsst_1') <font color="#000000"><font face="Arial, sans-serif"><font size="2">///rly =VLOOKUP(1,C1R1:C3R9,3,TRUE) is 100</font></font></font>]
 
  
<br /><br />
+
*[[Z_API_Functions | List of Main Z Functions]]
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| class="  " | Column1
 
| class="          " | Column2
 
| class="  " | Column3
 
| class="  " | Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="  " | 0.327
 
| class="sshl_f" | 4.52
 
| class="sshl_f" | 600
 
| class="sshl_f" | 2.5
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | .423
 
| class="sshl_f" | 4.21
 
| class="sshl_f" | 500
 
| class="sshl_f" | 100
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 0.517
 
| class="sshl_f" | 3.87
 
| class="sshl_f" | 400
 
| class="SelectTD                                                              sshl_f sshl_t ChangeBGColor" |
 
|- class="even"
 
| Row4
 
| class="sshl_f" | 0.574
 
| class="sshl_f" | 3.15
 
| class="sshl_f" | 300
 
| class=" sshl_t" |
 
|- class="odd"
 
| class=" " | Row5
 
| class="sshl_f" | 0.643
 
| class="sshl_f" | 2.98
 
| class="sshl_f" | 200
 
| class=" sshl_t" |
 
|- class="even"
 
| class="sshl_f" | Row6
 
| class="sshl_f" | 0.711
 
| class="sshl_f" | 2.75
 
| class="sshl_f" | 150
 
| class="sshl_f" |
 
|- class="odd"
 
| class="sshl_f" | Row7
 
| class="sshl_f" | 0.857
 
| class="sshl_f" | 2.5
 
| class="sshl_f" | 100
 
| class="sshl_f  " |
 
|- class="even"
 
| class="sshl_f" | Row8
 
| class="sshl_f" | 2.04
 
| class="sshl_f" | 0.987
 
| class="sshl_f" | 50
 
| class="sshl_f" |
 
|- class="odd"
 
| class="sshl_f" | Row9
 
| class="sshl_f" | 2.18
 
| class="sshl_f" | 0.975
 
| class=" " | 0
 
| class="                                              sshl_f  " |
 
|}
 
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 16:30, 9 August 2018

VLOOKUP (Value,Array,Column,ApproximateMatchFlag)


where,

  • Value is the value to be matched from an array or first column of the table,
  • Array refers to two or more columns of data values,
  • Column is the column number in the table from which the matching value should be returned, and
  • ApproximateMatchFlag is an optional logical value that specifies whether to find an exact match or approximate match of the mentioned lookup value.
    • VLOOKUP(), looks in the first column of an array and moves across the row to return the value of a cell.

Description

VLOOKUP (Value,Array,Column,ApproximateMatchFlag)

  • The 'V' in VLOOKUP stands for vertical. This function looks the value column wise.
  • Arguments containing text values entered as a part of command, should be enclosed in quotes (e.g. "JOHN").
  • VLOOKUP function is not case-sensitive.
  • If Value is less than 'smallest value in first column of table', Calci displays #NULL error message.
  • If Column is 1, Calci returns the value from the first column in table array. If column_index_num is 2, Calci returns the value from the second column in table array and so on.
  • For Column < 1 or Column > 'number of columns in array', Calci returns #NULL error message.
  • The values in first column should be arranged in ascending order for correct results.
  • Argument ApproximateMatchFlag can be TRUE or FALSE.
  • If ApproximateMatchFlag is TRUE or Omitted, Calci returns exact or approximate match of the value.
  • Approximate value is the largest value that is <= lkup_val.
  • If ApproximateMatchFlag is FALSE, Calci searches only for the exact match. If exact match is not found, Calci returns #NULL error message.
  • For invalid arguments, Calci displays #NULL error message.

Examples

Following table shows the use of VLOOKUP function -

Number Square Cube
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
=VLOOKUP(3,A2:C7,2) : Looks up for '3' in Number Column and returns value from Square column 
in the same row. Returns 9 as a result. =VLOOKUP(5,A2:C7,3,FALSE) : Looks up for exact match for '5' in Number Column and returns value from
Cube column in the same row. Returns 125 as a result. =VLOOKUP(5.5,A2:C7,2,TRUE) : Looks up for approximate match for '5.5' in Number Column,
matches the nearest value '5' and returns value from Square column in same row.
Returns 25 as a result.

Related Videos

VLOOKUP

See Also

References