Nitin Suntwal
New Member
Hi There,
I am trying to update column F (Code), I want it to update automatically with VBA.
I have a worksheet where I have to update the code manually in column F (Code) based on Column A (Drawers) & E (Drawer Levels). The column E contains numbers from 2 to 5 the numbers are assigned some values given below:
Drawer Levels Assigned Value
2 10000
3 1000
4 100
5 1
Below are the column A and its description
Drawers Father Account Key
Asset 100000
Liability 200000
Equity 300000
Revenues 400000
Expenses 500000
In column E the same numbers are repeated many times. Below is the logic
For Assets
First time if column A (Drawers) is Asset & column E (Drawer Levels) is 2 then the F (Code) column should be 100000. Second time if if column A (Drawers) is Asset & column E (Drawer Levels) is 2 then the F (Code) column should be 100000+10000.
For Liability
First time if column A (Drawers) is Liability & column E (Drawer Levels) is 2 then the F (Code) column should be 200000. Second time if if column A (Drawers) is Liability & column E (Drawer Levels) is 2 then the F (Code) column should be 200000+10000.
For Equity
First time if column A (Drawers) is Equity & column E (Drawer Levels) is 2 then the F (Code) column should be 300000. Second time if if column A (Drawers) is Equity & column E (Drawer Levels) is 2 then the F (Code) column should be 300000+10000.
and so on.
I have tried all the ways you can change the sheet as per your convenient. The VBA macro is in module 5.
Attached is the worksheet for your reference.
Thanks,
Nitin Suntwal.
I am trying to update column F (Code), I want it to update automatically with VBA.
I have a worksheet where I have to update the code manually in column F (Code) based on Column A (Drawers) & E (Drawer Levels). The column E contains numbers from 2 to 5 the numbers are assigned some values given below:
Drawer Levels Assigned Value
2 10000
3 1000
4 100
5 1
Below are the column A and its description
Drawers Father Account Key
Asset 100000
Liability 200000
Equity 300000
Revenues 400000
Expenses 500000
In column E the same numbers are repeated many times. Below is the logic
For Assets
First time if column A (Drawers) is Asset & column E (Drawer Levels) is 2 then the F (Code) column should be 100000. Second time if if column A (Drawers) is Asset & column E (Drawer Levels) is 2 then the F (Code) column should be 100000+10000.
For Liability
First time if column A (Drawers) is Liability & column E (Drawer Levels) is 2 then the F (Code) column should be 200000. Second time if if column A (Drawers) is Liability & column E (Drawer Levels) is 2 then the F (Code) column should be 200000+10000.
For Equity
First time if column A (Drawers) is Equity & column E (Drawer Levels) is 2 then the F (Code) column should be 300000. Second time if if column A (Drawers) is Equity & column E (Drawer Levels) is 2 then the F (Code) column should be 300000+10000.
and so on.
I have tried all the ways you can change the sheet as per your convenient. The VBA macro is in module 5.
Attached is the worksheet for your reference.
Thanks,
Nitin Suntwal.