vlookup a cell with a formula and iferror copy cell

bobbieatendido

New Member
Joined
Jul 13, 2016
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hi,

Is it possible to vlookup a cell that contains a formula?

International code is internationalcode+lot#
Hidden is a "hidden column" that contains a formula to only get the international code =left(B2,6)
Local code is a vlookup of column C
Product Name is a vlookup of column D

Note: Not all products have an international code
Column D needs to be a: vlookup C2, if the data is blank then copy column B2

Book1
ABCDEFGHIJKL
1Order#International CodeHiddenLocal CodeProduct NameData
221234566543211234561234566543210International CodeLocal CodeProduct NamePrice
332345677654322345672345677654320123456111-111TBS Crossfire Nano RX25
44 00234567111-112TBS Crossfire Nano (SE)30
55 00345678345678TBS Tracer Nano RX30
66 00456789456789TBS Micro TX70
77 00A1500Ethix Mambo190
8800A1600FRSky Xlite140
Sheet1
Cell Formulas
RangeFormula
D2:D8D2=IFERROR(VLOOKUP(C2,I:J,2,FALSE),B2)
E2:E8E2=IFERROR(VLOOKUP(D2,J:K,2,FALSE),0)
C2:C7C2=LEFT(B2,6)


Thank you.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
For D2, its supposed to be 111-111 since C2 has a value from the "Data"
if in B2 I wrote A1500, since there is no A1500 in Column I, then D2 should just copy B2.
 
Upvote 0
How about
Excel Formula:
=IFERROR(VLOOKUP(C2+0,I:J,2,FALSE),B2)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top