PDA

View Full Version : Change Column Content



adamsm
02-17-2011, 12:48 PM
Hi anyone,

My workbook has two sheets. One named as "Bill" and the other as “Data”.

For example cell F35 of the active sheet has 0014 cell M35 has 100 and cell O6 has 0001.

In “Data” sheet cell B20 has 0001 and cell C20 has 0014 and F20 has 30.
How could I write a code that would change the value in cell F20 of the sheet "Data" to 200 when the user changes the value of cell M35 in the active sheet to 200.

Any suggestion on this would be appreciated.

Simon Lloyd
02-18-2011, 05:56 AM
Just use a formula rather than code (put this in F20 of the Data sheet):
=If(Bill!M35<>30,200,30)

adamsm
02-18-2011, 10:37 AM
Thanks for the reply Simon. For further clarification I've attached a sample workbook.

The sheet "Bills" sheet contains the serial number 1155 in cell O6. Column F contains the product code. And the column M contains product rate.

My question is;

How to change the rate, highlighted in yellow in the sheet "Data"to 40.00 when the user changes the cell M18 in the "Bills" sheet to 40.00 with the help of a VBA code?

In the same way if the user changes the rate for tomatoes from 20.00 to 25.00 in the "Bills" sheet and click the macro button; the related data to be changed in the "Data" sheet.

In short; the product rate to get changed from the "Data" sheet(in reference to the serial number and product code in the Bills sheet) when the user changes the column content of "M" from the "Bills" Sheet.