Hi All,
I'm looking for one function/vba code which needs to repeat the required cell value based on the given condition.
Example:
Manual Data:
[TABLE="width: 192"]
<colgroup><col style="width:48pt" span="3" width="64"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 64"]Number[/TD]
[TD="class: xl64, width: 64"]8[/TD]
[TD="class: xl64, width: 64"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]Names[/TD]
[TD="class: xl65"]%[/TD]
[TD="class: xl65"]Rept No[/TD]
[/TR]
[TR]
[TD="class: xl64"]A[/TD]
[TD="class: xl66"]40%[/TD]
[TD="class: xl64"]4
[/TD]
[/TR]
[TR]
[TD="class: xl64"]B[/TD]
[TD="class: xl66"]30%[/TD]
[TD="class: xl64"]3[/TD]
[/TR]
[TR]
[TD="class: xl64"]C[/TD]
[TD="class: xl66"]20%[/TD]
[TD="class: xl64"]1[/TD]
[/TR]
</tbody>[/TABLE]
Required Output:
[TABLE="width: 128"]
<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Numbers
[/TD]
[TD="class: xl66, width: 64"]Names
[/TD]
[/TR]
[TR]
[TD="class: xl66"]1
[/TD]
[TD="class: xl66"]A
[/TD]
[/TR]
[TR]
[TD="class: xl66"]2
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]3
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]4
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]5
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]6
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]7
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]8
[/TD]
[TD="class: xl66"]C[/TD]
[/TR]
</tbody>[/TABLE]
In the given example you can see the % should enter by the user based on number 8 which is input value by the user.
You can also find the corresponding value (used Round function) here like 4, 3, 1. The moment I type Number 8 the function should give the output stated above. The names should repeat as per correspond value.
can anyone provide best solution for this requirement.
Thanks,
I'm looking for one function/vba code which needs to repeat the required cell value based on the given condition.
Example:
Manual Data:
[TABLE="width: 192"]
<colgroup><col style="width:48pt" span="3" width="64"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 64"]Number[/TD]
[TD="class: xl64, width: 64"]8[/TD]
[TD="class: xl64, width: 64"] [/TD]
[/TR]
[TR]
[TD="class: xl65"]Names[/TD]
[TD="class: xl65"]%[/TD]
[TD="class: xl65"]Rept No[/TD]
[/TR]
[TR]
[TD="class: xl64"]A[/TD]
[TD="class: xl66"]40%[/TD]
[TD="class: xl64"]4
[/TD]
[/TR]
[TR]
[TD="class: xl64"]B[/TD]
[TD="class: xl66"]30%[/TD]
[TD="class: xl64"]3[/TD]
[/TR]
[TR]
[TD="class: xl64"]C[/TD]
[TD="class: xl66"]20%[/TD]
[TD="class: xl64"]1[/TD]
[/TR]
</tbody>[/TABLE]
Required Output:
[TABLE="width: 128"]
<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Numbers
[/TD]
[TD="class: xl66, width: 64"]Names
[/TD]
[/TR]
[TR]
[TD="class: xl66"]1
[/TD]
[TD="class: xl66"]A
[/TD]
[/TR]
[TR]
[TD="class: xl66"]2
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]3
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]4
[/TD]
[TD="class: xl66"]A[/TD]
[/TR]
[TR]
[TD="class: xl66"]5
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]6
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]7
[/TD]
[TD="class: xl66"]B[/TD]
[/TR]
[TR]
[TD="class: xl66"]8
[/TD]
[TD="class: xl66"]C[/TD]
[/TR]
</tbody>[/TABLE]
In the given example you can see the % should enter by the user based on number 8 which is input value by the user.
You can also find the corresponding value (used Round function) here like 4, 3, 1. The moment I type Number 8 the function should give the output stated above. The names should repeat as per correspond value.
can anyone provide best solution for this requirement.
Thanks,