Looking for a specific number in a cell that can have multiple numbers separated by a comma (Using Mac Excel)

HansM

New Member
Joined
Nov 16, 2017
Messages
7
Office Version
  1. 365
Platform
  1. MacOS
I have two data set sheets, (Sheet1) contains invoice data and the other has service data. Unfortunately, the (Sheet2) service sheet does not show the invoice used to pay for the service and the Invoice sheet will often combine services that were paid by one invoice (example: 3062, 3060, 3061, 3058, 3139.) So I have created a third sheet (Sheet3) to look for the data and combine the two data sheets; however, I am having an issue when trying to search the status of a job if it is associated with other jobs. I want the invoice number that is associated with the job number listed in the (B Column) and the paid status in the (F Column).

Sheet # 1
Book1
ABCDEFGHIJK
1Invoice #Client nameClient emailClient phoneService streetService cityService provinceService ZIPMarked paid dateJob #sStatus
22545Client 1 Client 1 EMAILClient 1 PHONE #Client 1 ADDRESSBoiseID8370631-Jan-183161Paid
32536Client 2 Client 2 EMAILClient 2 PHONE #Client 2 ADDRESSPark CityUtah8406026-Jan-183163Paid
42537Client 3 Client 3 EMAILClient 3 PHONE #Client 3 ADDRESSPark CityUtah8406029-Jan-183164Paid
52547Client 4 Client 4 EMAILClient 4 PHONE #Client 4 ADDRESSTacomaWashington984471-Feb-183167Paid
62546Client 5 Client 5 EMAILClient 5 PHONE #Client 5 ADDRESSKirklandWashington9803431-Jan-183169Paid
72544Client 6 Client 6 EMAILClient 6 PHONE #Client 6 ADDRESSWylieTexas7509831-Jan-183170Paid
82553Client 7 Client 7 EMAILClient 7 PHONE #Client 7 ADDRESSStarIdaho836691-Feb-183176Paid
92521Client 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanstonWY8293022-Jan-183043, 3084, 3083, 3085, 3086, 3088, 3087, 3090, 3092, 3089, 3091, 3094, 3096, 3093, 3095Paid
102514Client 9 Client 9 EMAILClient 9 PHONE #Client 9 ADDRESSKentWashington980305-Mar-183046, 3047Paid
112512Client 10 Client 10 EMAILClient 10 PHONE #Client 10 ADDRESSSedro-WoolleyWashington9828427-Mar-183048, 3039Paid
122526Client 11 Client 11 EMAILClient 11 PHONE #Client 11 ADDRESSShorelineWashington9813320-Feb-183062, 3060, 3061, 3058, 3139Paid
132511Client 12 Client 12 EMAILClient 12 PHONE #Client 12 ADDRESSPortlandOregon9720912-Feb-183077, 3076Paid
142520Client 13 Client 13 EMAILClient 13 PHONE #Client 13 ADDRESSProvoUT8460116-Jan-183102, 3101Paid
152551Client 14 Client 14 EMAILClient 14 PHONE #Client 14 ADDRESSSeattleWashington9810820-Feb-183111, 3110, 3109, 3112Paid
162524Client 15 Client 15 EMAILClient 15 PHONE #Client 15 ADDRESSRentonWashington9805619-Jan-183119, 3120Paid
172542Client 16 Client 16 EMAILClient 16 PHONE #Client 16 ADDRESSTukwilaWashington9816820-Feb-183132, 3131, 3116, 3125, 3129, 3115, 3140Paid
182527Client 17 Client 17 EMAILClient 17 PHONE #Client 17 ADDRESSLongviewWA9863227-Mar-183134, 3136, 3135, 3137Paid
192541Client 18 Client 18 EMAILClient 18 PHONE #Client 18 ADDRESSIssaquahWashington9802726-Feb-183143, 3147Paid
202548Client 19 Client 19 EMAILClient 19 PHONE #Client 19 ADDRESSKentWashington9803026-Feb-183157, 3159, 3158Paid
Sheet 1 (Invoice Sheet)


Sheet # 2
Book1
ABCDEFGHIJKLMN
1Job #DateVisit titleClient nameClient emailClient phoneService streetService cityService provinceService ZIPVisit completedAssigned toLine itemsOne-off job ($)
2304322-Jan-18Client 8 - ThermalClient 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneCanine Inspection1000
3308422-Jan-18Client 8 - ThermalClient 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneCanine Inspection1000
4308322-Jan-18Client 8 - ThermalClient 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneThermal Remediation0
5308522-Jan-18Client 8 - ThermalClient 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneCanine Inspection1620
6308622-Jan-18Client 8 - ThermalClient 8 Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinThermal Remediation1200
7308822-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinThermal Remediation1100
8308722-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneThermal Remediation1100
9309022-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneThermal Remediation1200
10309222-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinCanine Inspection0
11308922-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneThermal Remediation1200
12309122-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinThermal Remediation1100
13309422-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneThermal Remediation1000
14309622-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesNelly ToneCanine Inspection1000
15309322-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinCanine Inspection1000
16309522-Jan-18Client 8 - ThermalClient 8Client 8 EMAILClient 8 PHONE #Client 8 ADDRESSEvanston82930YesTalbert WalkinCanine Inspection1000
17316131-Jan-18Client 1 - ThermalClient 1 Client 1 EMAILClient 1 PHONE #Client 1 ADDRESSBoise83706YesNelly ToneThermal Remediation1200
18316326-Jan-18Client 2 - ThermalClient 2 Client 2 EMAILClient 2 PHONE #Client 2 ADDRESSPark City84060YesTalbert WalkinCanine Inspection1200
19316429-Jan-18Client 3 - ThermalClient 3 Client 3 EMAILClient 3 PHONE #Client 3 ADDRESSPark City84060YesNelly ToneCanine Inspection900
2031671-Feb-18Client 4 - ThermalClient 4 Client 4 EMAILClient 4 PHONE #Client 4 ADDRESSTacoma98447YesNelly ToneThermal Remediation900
21316931-Jan-18Client 5 - ThermalClient 5 Client 5 EMAILClient 5 PHONE #Client 5 ADDRESSKirkland98034YesTalbert WalkinCanine Inspection350
22317031-Jan-18Client 6 - ThermalClient 6 Client 6 EMAILClient 6 PHONE #Client 6 ADDRESSWylie75098YesNelly ToneCanine Inspection1100
2331761-Feb-18Client 7 - ThermalClient 7 Client 7 EMAILClient 7 PHONE #Client 7 ADDRESSStar83669YesTalbert WalkinThermal Remediation1100
2430465-Mar-18Client 9 - ThermalClient 9 Client 9 EMAILClient 9 PHONE #Client 9 ADDRESSKent98030YesTalbert WalkinCanine Inspection1440
2530475-Mar-18Client 9 - ThermalClient 9 Client 9 EMAILClient 9 PHONE #Client 9 ADDRESSKent98030YesTalbert WalkinThermal Remediation2240
26
Sheet 2 (Service Sheet)


Shee1 3 Data Set

Cell Formulas
RangeFormula
C2:C25C2=IFERROR(VLOOKUP(A2,'Sheet 2 (Service Sheet)'!A:N,14,FALSE),0)
D2:D25D2=IFERROR(VLOOKUP(A2,'Sheet 2 (Service Sheet)'!A:N,2,FALSE),0)
E2:E25E2=IFERROR(VLOOKUP(A2,'Sheet 2 (Service Sheet)'!A:N,12,FALSE),0)
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
In Cell B2: =TEXTJOIN(", ",TRUE,FILTER('Sheet 1 (Invoice Sheet)'!$A$2:$A$100000,ISNUMBER(SEARCH("*"&A2&"*",'Sheet 1 (Invoice Sheet)'!$J$2:$J$100000)),""))
 
Upvote 0
In Cell B2: =TEXTJOIN(", ",TRUE,FILTER('Sheet 1 (Invoice Sheet)'!$A$2:$A$100000,ISNUMBER(SEARCH("*"&A2&"*",'Sheet 1 (Invoice Sheet)'!$J$2:$J$100000)),""))
Jeffery, Thank you so much for the help. I am almost there; everything worked great except for invoices that were under the number sequence of 1,000, at invoice 999 and lower. It added a whole array of invoice numbers to each cell.
 

Attachments

  • Invoice issues.jpg
    Invoice issues.jpg
    91.7 KB · Views: 10
Upvote 0
an alternative is with Power Query

Power Query:
let
    T1 = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    SplitCol = Table.ExpandListColumn(Table.TransformColumns(Table.TransformColumnTypes(T1, {{"Job #s", type text}}, "en-US"), {{"Job #s", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Job #s"),
    Trim = Table.TransformColumns(SplitCol,{{"Job #s", Text.Trim, type text}}),
    T2 = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(T2,{{"Job #", type text}}),
    MQ = Table.NestedJoin(Trim, {"Job #s"}, #"Changed Type", {"Job #"}, "Table2", JoinKind.FullOuter),
    #"Expanded Table2" = Table.ExpandTableColumn(MQ, "Table2", {"Job #", "Date", "Assigned to", "One-off job ($)"}, {"Job #", "Date", "Assigned to", "One-off job ($)"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Expanded Table2",{"Invoice #", "Job #s", "Status", "Date", "Assigned to", "One-off job ($)"}),
    #"Reordered Columns" = Table.ReorderColumns(#"Removed Other Columns",{"Job #s", "Invoice #", "Status", "One-off job ($)", "Date", "Assigned to"}),
    #"Changed Type2" = Table.TransformColumnTypes(#"Reordered Columns",{{"Date", type date}})
in
    #"Changed Type2"
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can a job numbe have more than one invoice number?
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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