AlexMason
07-19-2010, 08:24 AM
Hey guys
Sheets("Sheet1").Select
Sheets("Sheet1").Cells(Copy_Row, Copy_Col).Select
ActiveCell.Copy
Sheets("HP").Select
Sheets("HP").Cells(Paste_Row, Paste_Col).Select
Selection.PasteSpecial Paste:=xlPasteValues
thats a snippet of my code
what i want to be able to do on that last line with the paste special is multiply it by a variable which has been determined earlier on depending on whether metric or imperial units where chosen in the form.
basically its taking a metric value from one sheet and pasting into another and if metric was chosen i want it multiplied by 1 or if imperial was chosen i need it multiplied by (1/25.4) to go to inches from mm
can that be done? i seen a xlMultiply Operator but i cant really fathom what it does.... where do you put the number you wish to multiply by?
or is it just safer to go with saving the cell contents to a variable, multiply that variable by the conversion factor variable and then putting that back in the cell?
Sheets("Sheet1").Select
Sheets("Sheet1").Cells(Copy_Row, Copy_Col).Select
ActiveCell.Copy
Sheets("HP").Select
Sheets("HP").Cells(Paste_Row, Paste_Col).Select
Selection.PasteSpecial Paste:=xlPasteValues
thats a snippet of my code
what i want to be able to do on that last line with the paste special is multiply it by a variable which has been determined earlier on depending on whether metric or imperial units where chosen in the form.
basically its taking a metric value from one sheet and pasting into another and if metric was chosen i want it multiplied by 1 or if imperial was chosen i need it multiplied by (1/25.4) to go to inches from mm
can that be done? i seen a xlMultiply Operator but i cant really fathom what it does.... where do you put the number you wish to multiply by?
or is it just safer to go with saving the cell contents to a variable, multiply that variable by the conversion factor variable and then putting that back in the cell?