Excel if condition meets for other cell write current cell

Hi, I’m trying to create an automation that loops through my excel sheet and checks the dot (.) count of the cells in each row. There are 3 types of data for column A;

Column A, Column B
100,xx
100.01,yy
100.01.01,zz

If 100.01.01 exist discard the other ones. That’s easy with a regex that checks dot counts.

But if 100.01.01 does not exist get the 100.01’s value. I couldn’t find a way to get this one.

Hi @Ali_Ilhami_OZTAN ,

( From row In DataTable.AsEnumerable() Where row.Item(“Column A”).ToString.Contains(“100.01.01”) Select row.Item(“Column B”)).ToList(0)

Hi @Pradeep_Shiv
Actually this only checks if the 100.01.01 exist then writes the corresponding column b value. What I need is when automation sees 100.01 in column a it should check other values if 100.01.01 exist. If yes then it should do nothing. If not then it should get the corresponding column B value for 100.01.

This is a basic hierarchy which sums up at the higher level. 100 for example at the top, 100.01 is second level. 100.01.01 is the third level. What I want to get is the bottom most hierarchy whether it is second or third level.