VBA for Private Sub Worksheet_Change(ByVal Target As Range) code
Budget: $30 – $250 AUD
I am in need of a VBA expert who can write a code for the private sub Worksheet_Change(ByVal Target As Range) event in Excel. The code should have the following functionality:
Example file attached.
In columns A through H - if a product is sold 'Y' is entered.
Each product has a set cost to it (there are no multiple units of products, if it is sold it is 1 unit only).
Seeking:
1) In column J, to sum the costs of where that row has a 'Y' in a column.
2) In column K = col I - col J. (column I is to be free typed in by user)
Eg:
Col A and Col B contain a 'Y'
If cost of the product in col A is $250, and the cost of the product in col B is $75 - then col J to return $325. And col K should be -$325 until and value in col I is entered. Once $400 is typed into col I, col K should return $75.
The cost are fixed and can either be hard entered into the VBA or referenced to a table in another sheet.
Example file attached.
In columns A through H - if a product is sold 'Y' is entered.
Each product has a set cost to it (there are no multiple units of products, if it is sold it is 1 unit only).
Seeking:
1) In column J, to sum the costs of where that row has a 'Y' in a column.
2) In column K = col I - col J. (column I is to be free typed in by user)
Eg:
Col A and Col B contain a 'Y'
If cost of the product in col A is $250, and the cost of the product in col B is $75 - then col J to return $325. And col K should be -$325 until and value in col I is entered. Once $400 is typed into col I, col K should return $75.
The cost are fixed and can either be hard entered into the VBA or referenced to a table in another sheet.