Capture123.JPG
I have a dropdown option in column 1 with manual list as [N,S, J] and based on its selection I want in corresponding cell in column 2 as follows:
If "N" is selected
Then in corresponding cell in column 2 = "NK001"
If "S" is selected
Then in corresponding cell in column 2 = "SU001"
If "J" is selected
Then in corresponding cell in column 2 = "JP001"
And if again "N" is selected in next row in column 1, then corresponding cell value in column 2 should be "NK002"
If again "N" is selected in next row in column 1, then corresponding cell value in column 2 should be "NK003"
If again "N" is selected in next row in column 1, then corresponding cell value in column 2 should be "NK004"
If after above selection we select "S" in next row in column 1, then corresponding cell value in column 2 should be "SU002" (because last value for "S" was "SU001")
So, unique index should go for each selection in dropdown list.
Something like below:
Column1(Dropdown List) Column2
N NK001
S SU001
N NK002
J JK001
J JK002
J JK003
S SU002
----------------------------------------------------------
I am new to VBA programming. Can someone help me here with some code.
Bookmarks