VBA: Binary VlookUp against XLSX or XLS

unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
249
Office Version
  1. 2016
Platform
  1. Windows
Hello Gurus,

I have a Binary excel file and want to update a particular column using the unique identifier from an xlsx or xls (get open file) . Do you think it is feasible?

Example Binary Sheet:

NumberNameCountryNote
001MarkFinlandChecked
002SeanUnited States

Example: LookUp Reference Sheet (XLSX or XLS)

NumberCountryNote
001NordicVerified
002North AmericaVerified

Basically, The country in the Binary Sheet will be replaced based on the Number Identifier from the reference sheet. Finland to Nordic and United States to North America.


Appreciate the help.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I don't think you mean that you have a Binary file. That's not possible within Excel alone. Power Query will identify files as a Binary File when importing a folder, but that still can't be used in Excel.
The column that has the header "Number" is not a number. It's the text "001" and "002". Unless you force it by formatting it as 000.
Book1
AB
1Number
2001<- Cell Format is 000. Cell value is 1
3002<- Cell Format is 000. Cell value is 2
Sheet1
Those are numbers with a custom format of 000. There is no alignment formatting, so you know they're numbers since they're right justified. If they were text, they'd look like this:
1680027702182.png

Maybe this illustrates the problem better:
Book1
ABCDEFGHIJKLMN
1NumberValueNumberVlookup #Vlookup #NOT NumberValueVlookup TxtReturnedVlookup Txt
2001Row 21Row 2#N/A001Row 21#N/A001Row 2
3002Row 32Row 3#N/A002Row 32#N/A002Row 3
Sheet1
Cell Formulas
RangeFormula
E2E2=VLOOKUP(D2,A1:B3,2,0)
F2F2=VLOOKUP(D2,H1:I3,2,0)
E3E3=VLOOKUP(D3,A1:B3,2,0)
F3F3=VLOOKUP(D3,H1:I3,2,0)
L2:L3,N2:N3L2=VLOOKUP(K2,$H$1:$I$3,2,0)
As for the automatic numbering, I suggest you convert the data into a Table like this:
Book1
ABCD
1NumberNameCountryNote
2001MarkFinlandChecked
3002
Sheet2
Cell Formulas
RangeFormula
A2:A3A2=IF(ISNUMBER(A1),A1+1,1)
Now whenever you hit [Tab] in the last row of the Note column, a new row will be created and automatically generate the next number. Column A has a custom format of 000. The table will also extend if you enter anything into columns B-D. Just don't enter anything in Column A, the table will automatically copy the formula down in Column A retaining the custom format.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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