Pulling fields in a workbook based on a search string

Golfsgo47

New Member
Joined
Dec 16, 2019
Messages
1
Office Version
  1. 365
Platform
  1. Windows
First time poster, and hoping for some advanced help!! I am a high school teacher and hoping to find a way to populate a customized class list with students that are enrolled in my specific courses. I have access to the school wide database of students. It contains many fields that include their birth dates, student numbers, home forms, all of their classes etc. The database is in a .txt format. I have imported the data into a worksheet that has 1200+ rows (one row for each student in the school.) What I need to be able to do is search the student database for my specific course codes, and then pull all the first and last names of each student that has my course code. One potential snag: when I import that .txt file, all of the course codes get lumped into one cell (I assume because the .txt file does not separate each course code with a comma as it does with other fields.)

In short, I'm trying to avoid having to type out all of my student's names for each of my classes. I'd ideally like to use this code to generate several different class lists for different areas of my courses.

I'm sure I haven't been specific enough for anyone to really help, so if there are questions that you need answered, please ask them!!

Thanks!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hello there and welcome to the forum. One possible way forward if the course codes are unique, and cannot be misinterpreted by tagging the end of one onto the beginning of the next, then it would be possible to search for each course code within the concatenated string (or even apply a filter that looks for 'contains'). Can you post a small sample of de-personalised data here, along with a mockup of the output you are hoping for?
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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