Cannot merge because column has both text and numbers

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows

I've brought in two tables into power query:
- AccountNumber (column has text and numbers. Some of the numbers (e.g rows 2 - 6) are formatted as text (i.e. it has the green ribbon in the cell and is aligned to the left))
- LookupTable

The AccountNumber table has many columns but I've reduced it to one column for this question.
I'm trying to use the LookupTable and do a lookup on the account number to achive the output table.

I tried merge but get an error because the AccountNumber column has both text and numbers.

Is there a way that I can achieve the output table where some columns have both text and numbers involved?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
The LookupTable can be either of the below, whichever is easier to achieve the output table.

AccountActivity
77401405LANDTRANS


AccountActivity
77401405LANDTRANS
EXPENSE_INP


The row with text doesn't really need to be either in the lookup table. But there will be text in the AccountNumber table.
 
Upvote 0
Assuming the numeric values in the lookup table are actual numbers, you could add a calculated column to the main table using something like:

Power Query:
=try Number.From([Account]) otherwise [Account]

to convert any numeric data into an actual number, then merge on that new column.
 
Upvote 1
Solution

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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