Parsing a list of numbers

stefanaalten

Board Regular
Joined
Feb 1, 2011
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm struggling to come up with a way of producing the output I'm after. My data is as shown below:

IDListItem 1Item 2Item 3
A1,2
TRUE​
TRUE​
FALSE​
B
2​
FALSE​
TRUE​
FALSE​
C
FALSE​
FALSE​
FALSE​
D1,2,3
TRUE​
TRUE​
TRUE​

For each entry in my list (column A, ID's A-D) I have a list of numbers (column B). I would like to populate the columns Item 1, etc. with true/false values based on whether the item occurs in the list. It should be simple parsing function shouldn't it, but I'm not really sure how to go about it - can anyone please help? My actual list has 50 items, i.e. columns for Item 1 - Item 50. The lists (in column B) will not consist of more than 5 items, and I can ensure they are in ascending numeric order if that helps the formula.
I'd be really grateful for a bit of help! At the moment I'm populating the values in the Item columns manually, which is error-prone!
Kind regards,
Stefan
 
AlanY, many thanks for your solution, but it's a little impractical to enter the full titles in the list - in some cases I would end up with very long descriptions (some of the pad names list multiple instruments), so looking for a solution that allows the list to simply consist of the numbers (comma-separated or somehow delimited).
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
AlanY, many thanks for your solution, but it's a little impractical to enter the full titles in the list - in some cases I would end up with very long descriptions (some of the pad names list multiple instruments), so looking for a solution that allows the list to simply consist of the numbers (comma-separated or somehow delimited).
glad that you got it sorted
 
Upvote 0
My scenario has changed and now the solution (FormR's post) no longer works. I've tried to work it out and my brain is fried ? and would be very grateful if anyone (with a better brain than mine!) could help?

The range shown below is AH4:CA10 in my spreadsheet (top-left blank cell is AH4). The top row (i.e. row 4 in my spreadsheet) has numbers formatted with leading zeroes. The "Rehearsal Pads" column has the lists entered as text ('000, '011,012, '013, etc.) The lists in this column will consist of max. 5 items (but usually will just be 1-3 items).

What formula could produce the TRUE/FALSE values shown (in cells AI6:CA10)?

000010011012013020021022023etc.093100
Rehearsal PadsPad 000 ScorePad 010 PiccoloPad 011 Flute 1Pad 012 Flute 1Pad 013 Flute 2Pad 020 Oboe 1Pad 021 Oboe 1Pad 022 Oboe 2Pad 023 Bassoonetc.Pad 093 TimpaniPad 100 Various Others
000
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
etc.
FALSE
FALSE
011,012
FALSE
FALSE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
etc.
FALSE
FALSE
013
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE
FALSE
FALSE
etc.
FALSE
FALSE
020,021
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE
FALSE
FALSE
etc.
FALSE
FALSE
022
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
etc.
FALSE
FALSE
023
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
etc.
FALSE
FALSE
 
Upvote 0
Hi, you can try like this.

EDIT: XL2BB has converted the text in column AH and row 4 to numbers, they are / need to be, as you have them in post 14.

Book1
AHAIAJAKALAMANAOAPAQARASAT
40101112132021222393100
5Rehearsal PadsPad 000 ScorePad 010 PiccoloPad 011 Flute 1Pad 012 Flute 1Pad 013 Flute 2Pad 020 Oboe 1Pad 021 Oboe 1Pad 022 Oboe 2Pad 023 Bassoonetc.Pad 093 TimpaniPad 100 Various Others
60TrueFalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
711012FalseFalseTrueTrueFalseFalseFalseFalseFalseFalseFalse
813FalseFalseFalseFalseTrueFalseFalseFalseFalseFalseFalse
920021FalseFalseFalseFalseFalseTrueTrueFalseFalseFalseFalse
1022FalseFalseFalseFalseFalseFalseFalseTrueFalseFalseFalse
1123FalseFalseFalseFalseFalseFalseFalseFalseTrueFalseFalse
Sheet1
Cell Formulas
RangeFormula
AI6:AQ11, AS6:AT11AI6=ISNUMBER(FIND(","&AI$4&",",","&$AH6&","))
 
Last edited:
Upvote 0
Fantastic - many thanks! ??? (replacing the spurious zeroes in column AH with commas - assume that was just a typo)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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