How do I search multiple item codes in a cell reference?

jnilsson2810

New Member
Joined
Nov 16, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Goal: Search a dynamic list of items to plug into a sales order query from a cell reference.

I know how to reference a cell reference for only one item that can change in a cell reference, but I now need to know how to reference a cell or cells that have multiple items and filter to just those items in a sales order query in Microsoft Query.

Here is the syntax for just one item cell reference:

SO_SALESORDERDETAIL.ITEMCODE=?

The question mark means that it is an input from what I know.

I can reference one item, but not multiple.

I just need to know the right code how to search multiple items from a spreadsheet.

Any direction and feedback is much appreciated. Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Suggest you post some sample data of before and after. Use XL2BB. Your explanation is not quite clear enough and a visual may help.
 
Upvote 0
PO_PURCHASEORDERDETAIL.ITEMCODE=?

This code is on the Purchase Order side, but it's the same concept for the SO side.

The question mark means that I can use it as a cell reference. I only know how to search one item at a time, but I want to know how to query/filter to a cell reference or a list of items in a column into SQL code so that I can search multiple items based on a cell reference.

I uploaded some images to help show you what I mean by searching one at a time.
 

Attachments

  • Query After.JPG
    Query After.JPG
    13.3 KB · Views: 12
  • Query Before.JPG
    Query Before.JPG
    36 KB · Views: 12
Upvote 0
I don't know if it's possible, but I'm wondering if I could put a list of items like 344196, 660508, 660509, etc. in one cell in order to search multiple at a time.
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,616
Members
452,661
Latest member
Nonhle

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