ISNumber ()
This function examines a cell to determine whether it is a
numeric value.
|
A |
B |
C |
D |
1 |
Cell Entry |
Result |
||
2 |
1 |
TRUE |
=ISNUMBER(A2) |
|
3 |
20-Jan-21 |
TRUE |
=ISNUMBER(A3) |
|
4 |
|
FALSE |
=ISNUMBER(A4) |
|
5 |
#DIV/0! |
FALSE |
=ISNUMBER(A5) |
|
6 |
Hello |
FALSE |
=ISNUMBER(A6) |
|
7 |
#VALUE! |
FALSE |
=ISNUMBER(A7) |
|
8 |
If the cell or calculation is a numeric value the result TRUE is shown.
If the cell or calculation is not numeric or is blank, the
result FALSE is shown.
Syntax
=ISNumber (Cell)
Formatting
No
special formatting is needed.
Example
Below table has employee data like Emp ID, Emp Name, Salary, and Email. Sometimes operator
search details with Emp ID and sometimes with Emp Name.
So
ISNumber() function is used to
determine input cell whether the value is EmpID or Emp Name. And then IF() Function used to swap VLOOKUP() function.
|
A |
B |
C |
D |
E |
F |
12 |
column_1 |
column_2 |
column_3 |
column_4 |
||
13 |
Emp ID |
Emp Name |
Email ID |
Emp Salary |
||
14 |
810 |
Neeraj |
neeraj.kumar@gmail.com |
₹ 65,000 |
||
15 |
898 |
Syed |
syed.azam@gmail.com |
₹ 72,000 |
||
16 |
941 |
Rahul |
rahul.yadav@gmail.com |
₹ 53,000 |
||
17 |
986 |
Andrew |
andrew.shulman@gmail.com |
₹ 98,000 |
||
18 |
722 |
Brandan |
brandan.jeorge@gmail.com |
₹ 85,000 |
||
19 |
701 |
Vijay |
vijay.yadav@gmail.com |
₹ 91,000 |
||
20 |
969 |
Saif |
saif.ali@gmail.com |
₹ 65,000 |
||
21 |
967 |
Ryan |
ryan.jourdan@gmail.com |
₹ 82,000 |
||
22 |
885 |
Matthew |
matthew.boltz@gmail.com |
₹ 78,000 |
||
23 |
748 |
Akshay |
akshay.kumar@gmail.com |
₹ 69,000 |
||
24 |
||||||
25 |
Employee Name or ID |
748 |
||||
26 |
Employee Email ID |
akshay.kumar@gmail.com |
||||
27 |
Employee Salary |
₹ 69,000 |
||||
28 |
=IF(ISNUMBER(C25),VLOOKUP(C25,A13:C23,3,0),VLOOKUP(C25,B13:C23,2,0)) |
|||||
29 |
=IF(ISNUMBER(C25),VLOOKUP(C25,A13:D23,4,0),VLOOKUP(C25,B13:D23,3,0)) |
|||||
30 |
The ISNUMBER()
function has been used to identify the type of entry made, and then
The IF() decides
which VLOOKUP to perform.
In the above example, we have entered Emp ID, and on the
basis of that result is showing. If you will enter Emp Name then it will swap VLOOKUP to perform.
No comments:
Post a Comment