Excel wizards!
My question
I'm trying to extract some voting statistics from lengthy text summaries that vary in form. Any help producing the right formulae for each column would be hugely appreciated.
What numbers I'm looking for
1. (To be extracted in one column) The voting numbers taking the form "X-Y" that appear immediately after the first time the phrase "House House Floor" appears
2. (To be extracted in another column) The voting numbers taking the form "X-Y" that appear immediately after the first time the phrase "Senate Senate Floor" appears
Some examples of the text I'm extracting from
04/18/2022 - House Appropriations Committee P 39-0;04/21/2022 - House House Floor P 88-4;05/18/2022 - Senate Senate Floor P 38-0;05/19/2022 - House House Floor P 15-7
04/07/2022 - House Retirement Committee P 8-0;04/18/2022 - House House Floor P 29-0;05/16/2022 - Senate Senate Floor P 32-0;05/19/2022 - House House Floor P 94-0
01/12/2021 - INTRODUCED.;01/12/2021 - Filed as LR 58.;01/12/2021 - HOUSE refers to JOINT Committee on STATE AND LOCAL GOVERNMENT.;02/22/2021 - Work Session Held 02/17/2021.;03/10/2021 - From JOINT Committee on STATE AND LOCAL GOVERNMENT: with divided report.;03/11/2021 - HOUSE adopts Majority Committee Report: Ought to pass as amended
02/22/2022 - Senate Senate Floor P 33-0
I.e. the last two examples show that sometimes the voting statistics I'm looking for aren't there, in which case, I'd like to generate the text, "No information" in the relevant column(s)
My attempts so far
I initially was looking at just one sheet, in which the entries all more neatly took the form, "02/10/2022 - House House Floor P 77-0;03/15/2022 - Senate Senate Floor P 15-0"
I pulled together this horrendously unwieldly chain of formulae in the attached.
And then to my dismay, I realized that several entries take multiple forms with multiple mentions of House House Floor, other committees, not always separated by semicolon etc, so the attached will only work nicely for a couple of sheets (of which there are 20)
Thanks so much again for any help you can provide!
Best,
RK94
Bookmarks