arnoudholtzer
New Member
- Joined
- May 7, 2020
- Messages
- 12
- Office Version
- 365
- 2019
- Platform
- Windows
Hi ALL,
Can anyone help me out creating a vlookup in macro? Two reasons that i need it to be macro instead of normal formula.
- I need to have empty fields in the exceltable itself and where i got 3 columns that need to be autofilled by vlookup if one of the fields is filled in manually.
- Also i need to get rid of an itterations error as the following formula =if.error(Vlookup(C5,'Sheet2'!A:C;2;False),"") in an example in cell B5 looks up in it's own cell if there's an error and then fills nothing instead of n/a or 0
I don't know if i can add my example excel sheet to this message as i do not see an upload button here... Therefor i just pasted the 2 tables since it's a basic example.
Below is an example of sheet1:
Below is an example of the datatable to lookup above missing data by vlookup.
Can anyone help me out creating a vlookup in macro? Two reasons that i need it to be macro instead of normal formula.
- I need to have empty fields in the exceltable itself and where i got 3 columns that need to be autofilled by vlookup if one of the fields is filled in manually.
- Also i need to get rid of an itterations error as the following formula =if.error(Vlookup(C5,'Sheet2'!A:C;2;False),"") in an example in cell B5 looks up in it's own cell if there's an error and then fills nothing instead of n/a or 0
I don't know if i can add my example excel sheet to this message as i do not see an upload button here... Therefor i just pasted the 2 tables since it's a basic example.
Below is an example of sheet1:
Ordernr | Number x | Number y | Description |
1 | 3232222 | 2233.123.12344 | Apple |
2 | 4331311 | 2233.133.12345 | Banana |
3 | 1123123 | vlookupmacro | vlookupmacro |
4 | =if.error(Vlookup(C5,'Sheet2'!A:C;2;False),"") | 1233.113.15555 | vlookupmacro |
5 | vlookupmacro | vlookupmacro | Berry |
6 | vlookupmacro | vlookupmacro | vlookupmacro |
7 | vlookupmacro | vlookupmacro | vlookupmacro |
Below is an example of the datatable to lookup above missing data by vlookup.
Number x | Number y | Description |
3232222 | 2233.123.12344 | Apple |
4331311 | 2233.133.12345 | Banana |
1123123 | 1243.133.14222 | Strawberry |
3256666 | 1233.113.15555 | Plum |
1423665 | 1233.133.14447 | Berry |