Hi All
I want to have a Function with select case that:
range value is range(A2: last row) and group by range(B2:lastrow) like below table have 04 group:
The code of function like this:
I'm not sure how to code right to do this, please help me
Thanks./.
<tbody>
</tbody>
I want to have a Function with select case that:
range value is range(A2: last row) and group by range(B2:lastrow) like below table have 04 group:
The code of function like this:
Code:
Funtion ()
for i = range(A2: lastrow)
select case group by range(B2:last row)
Case a = Array("B004")
'group by range (B2:last row) = "20"
Case a = Array("A002","G010")
'group by range (B2:last row) = "15"
Case a = Array("B002","B010")
'group by range (B2:last row) = "10"
Case Esle --->
'group by range (B2:last row) = "7"
next i
End Function
I'm not sure how to code right to do this, please help me
Thanks./.
A | B | |
1 | A001 | 7 |
2 | B002 | 10 |
3 | A002 | 15 |
4 | B004 | 20 |
5 | C005 | 7 |
6 | C001 | 7 |
7 | A010 | 7 |
8 | B010 | 10 |
9 | G010 | 15 |
<tbody>
</tbody>