Tag data as "Parent", "Child 1", "Child 2"

iamrohin

New Member
Joined
Feb 6, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a set of data in a column laid out in the format shown below.
I want to tab "ABC" as parent in next column, "DEF" as child 1, "GHI" as child 2 and so on and so forth.

Can someone help me to write a formula that would do this for be in the next column

Screenshot 2024-02-06 171207.png
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
What are the conditions to mark an entry "Parent", "Child 1/2", etc? I mean, I can look at it and make the decision, but that is easier said than writing the formula for it. Would the third entry of "DEF" also be "Parent"?
 
Upvote 0
Assuming this is how you're grouping them:



ABC
DEF
GHI
JKL
MNO
PQR
STU
VWX
YZ

=IF(A1="","",IF(LEFT(A1)="A","Parent","Child " & INT((CODE(LEFT(A1))-64)/3)))

Book3
AB
1ABCParent
2DEFChild 1
3GHIChild 2
4JKLChild 3
5MNOChild 4
6PQRChild 5
7STUChild 6
8VWXChild 7
9YZChild 8
Sheet1
Cell Formulas
RangeFormula
B1:B9B1=IF(A1="","",IF(LEFT(A1)="A","Parent","Child " & INT((CODE(LEFT(A1))-64)/3)))
 
Last edited:
Upvote 0
What are the conditions to mark an entry "Parent", "Child 1/2", etc? I mean, I can look at it and make the decision, but that is easier said than writing the formula for it. Would the third entry of "DEF" also be "Parent"?
No DEF will be child 1 and anything under DEF will be child 2 (in this case GHI)
 
Upvote 0
Assuming this is how you're grouping them:



ABC
DEF
GHI
JKL
MNO
PQR
STU
VWX
YZ

=IF(A1="","",IF(LEFT(A1)="A","Parent","Child " & INT((CODE(LEFT(A1))-64)/3)))

Book3
AB
1ABCParent
2DEFChild 1
3GHIChild 2
4JKLChild 3
5MNOChild 4
6PQRChild 5
7STUChild 6
8VWXChild 7
9YZChild 8
Sheet1
Cell Formulas
RangeFormula
B1:B9B1=IF(A1="","",IF(LEFT(A1)="A","Parent","Child " & INT((CODE(LEFT(A1))-64)/3)))
I tried this but it won't work as it is not necessary that the first parent will start from "A"
 
Upvote 0
That is what you explained. How are you entering them and what are the conditions for determining it?
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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