Cooy data

glynn1969

Board Regular
Joined
Nov 24, 2018
Messages
88
Office Version
  1. 365
Platform
  1. Windows
Hello probably a very simple solution to my issue.

On sheet 1 column b I have a list of children going down column b then at the end of the first group I have the class they are in, then the list contues with the next group of children and then their class.

However I woukd like a vba code that would look down the list, ignore all the children names and then when it finds a text containing the word class, then apply that class in column A to all the children above, then repeat for the fill list in column b.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If a non vba solution will work, you can give this a try:
Book1
AB
1ClassRoster
2Class 1Adam
3Class 1Bobby
4Class 1Carly
5Class 1Daniel
6Class 1Esme
7Class 1Franky
8Class 1George
9Class 1Heather
10Class 1Isabella
11Class 1Jackson
12 Class 1
13Class 2Adam
14Class 2Bobby
15Class 2Carly
16Class 2Daniel
17Class 2Esme
18Class 2Franky
19Class 2George
20Class 2Heather
21Class 2Isabella
22Class 2Jackson
23 Class 2
24Class 3Adam
25Class 3Bobby
26Class 3Carly
27Class 3Daniel
28Class 3Esme
29Class 3Franky
30Class 3George
31Class 3Heather
32Class 3Isabella
33Class 3Jackson
34 Class 3
Sheet4
Cell Formulas
RangeFormula
A2:A34A2=LET(i,INDEX(FILTER($B$2:$B$34,ISNUMBER(SEARCH("Class",$B$2:$B$34))),COUNTIF($B$2:B2,"*Class*")+1),IF(ISNUMBER(SEARCH("Class",B2)),"",i))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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