default_name
Board Regular
- Joined
- May 16, 2018
- Messages
- 170
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
I have a table of information.
Let's call this Table 1.
Table 1
<tbody>
</tbody>
This second table (let's call this Table 2) allows the user to select an Activity from a dropdown list (which has been created for column F).
The corresponding TNumber and ID numbers are filled in from the first table.
Table 2
<tbody>
</tbody>
It appears to be working great in instances where an Activity has a TNumber and an ID number.
However, in Activity cases (such as Training) where there is no TNumber (only an ID number), I want the corresponding cell in the Table 2 to display a dash/hyphen (as below in cell G3).
Table 2
<tbody>
</tbody>
I figured that I could simply add an ISBLANK function with a conditional (IF) into the VLOOKUP function, but that doesn't seem to be working.
Here is how I have the TNumber cell coded (using the code inside G3 as an example).
for the TNumber
for the ID number
How can I make this work the way I am envisioning it?
Hope that makes sense.
Thanks in advance.
Let's call this Table 1.
Table 1
A | B | C | |
1 | Activity | TNumber | ID |
2 | Training | 54465 | |
3 | Exercise A | ABC111A | 91299 |
4 | Exercise B | ABC222B | 91300 |
<tbody>
</tbody>
This second table (let's call this Table 2) allows the user to select an Activity from a dropdown list (which has been created for column F).
The corresponding TNumber and ID numbers are filled in from the first table.
Table 2
F | G | H | |
1 | Activity | TNumber | ID |
2 | Exercise B | ABC22B | 91300 |
3 | |||
4 |
<tbody>
</tbody>
It appears to be working great in instances where an Activity has a TNumber and an ID number.
However, in Activity cases (such as Training) where there is no TNumber (only an ID number), I want the corresponding cell in the Table 2 to display a dash/hyphen (as below in cell G3).
Table 2
F | G | H | |
1 | Activity | TNumber | ID |
2 | Exercise B | ABC22B | 91300 |
3 | Training | - | 54465 |
4 |
<tbody>
</tbody>
I figured that I could simply add an ISBLANK function with a conditional (IF) into the VLOOKUP function, but that doesn't seem to be working.
Here is how I have the TNumber cell coded (using the code inside G3 as an example).
Code:
=IF(F3="","",VLOOKUP(F3,$A$2:$C$4,IF(ISBLANK(2),"-",2)))
Code:
=IF(F3="","",VLOOKUP(F3,$A$2:$C$4,IF(ISBLANK(3),"-",3)))
How can I make this work the way I am envisioning it?
Hope that makes sense.
Thanks in advance.