Query from two columns in table

bflan0524

Board Regular
Joined
Oct 7, 2016
Messages
193
Office Version
  1. 2010
hello, in the example below if i know the # in column A exist in there, and all is what is in column B, is there a query i can do in column C to match the columns where it identifies what is in column B and finds the match in column A for it
Column AColumn BColumn C
6000600545767000426000600545767?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
this will return either a True or False =LEFT(A2,LEN(B2))=B2
 
Upvote 0
this will return either a True or False =LEFT(A2,LEN(B2))=B2
i am prob not explaining well, column B is 13 characters, column A has 18, is there a way to look at the account in column B and see if there is a match in column A, which would then return the full # in column C if that makes sense? so ideally its a query that is searching column A for the 13 characters in column B and if identified it would return in column C
 
Upvote 0
something along the lines of this in a query calculated column, perhaps:
IIF(Instr([Column A],[Column B])>0,[Column A],"")
 
Upvote 0
I don't think you can use If in an Access query?
 
Upvote 0
In your example in post #1, what should be in column C?
 
Upvote 0

Forum statistics

Threads
1,224,946
Messages
6,181,940
Members
453,074
Latest member
JefersonKollet

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