ukelele_kumar
New Member
- Joined
- May 17, 2021
- Messages
- 2
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
- MacOS
- Web
I have a excel table in the form below:
The Level1 is parent records, Level2 is child records, Level3 is grandchild records and so on...
Level1-Level2 is the value of the Level1 that corresponds to Level2, Level2-Level3 is the value of the Level2 that corresponds to Level3, and so on...
I want the output in the 'repeated' form and the correspondence maintained as below-
I was thinking of starting from Level4 in upper table, take each value from Level4 i.e.,start with "j" and its corresponding value is "i" that to be replaced in the Level3 column, "i" to be replaced by "f" and then where "i" was present(E5) in the column Level3, it is replaced by "f". Swap like this for all columns..For that I was thinking if the correspondence is not matched, the relative address is placed and value is get from there using INDIRECT and ADDRESS function..
and in the end if there is missing values, then input the vlokoup'd value in the previous column. eg., in altered Level3 column, last value "f" has no value in Level2, we input the vlookup'd value in Level2 corresponding to "f".
I am looking into this for few days now. Can this be solved using a macro. Any leads would be highly grateful. Thanks in advance. In case of any clearance in the above question, please feel free to tell.
Level1 | Level1- Level2 | Level2 | Level2- Level3 | Level3 | Level3- Level4 | Level4 |
a | b | c | d | f | i | j |
b | a | d | e | g | g | k |
b | e | c | h | |||
d | i |
The Level1 is parent records, Level2 is child records, Level3 is grandchild records and so on...
Level1-Level2 is the value of the Level1 that corresponds to Level2, Level2-Level3 is the value of the Level2 that corresponds to Level3, and so on...
I want the output in the 'repeated' form and the correspondence maintained as below-
Level1 | Level2 | Level3 | Level4 |
a | d | i | j |
b | e | g | k |
b | c | h | |
a | d | f |
I was thinking of starting from Level4 in upper table, take each value from Level4 i.e.,start with "j" and its corresponding value is "i" that to be replaced in the Level3 column, "i" to be replaced by "f" and then where "i" was present(E5) in the column Level3, it is replaced by "f". Swap like this for all columns..For that I was thinking if the correspondence is not matched, the relative address is placed and value is get from there using INDIRECT and ADDRESS function..
and in the end if there is missing values, then input the vlokoup'd value in the previous column. eg., in altered Level3 column, last value "f" has no value in Level2, we input the vlookup'd value in Level2 corresponding to "f".
I am looking into this for few days now. Can this be solved using a macro. Any leads would be highly grateful. Thanks in advance. In case of any clearance in the above question, please feel free to tell.