Formula help pls

H

Hennie Neuhoff

Hi. Guys

I need some help with the following. I've got a list of employees in column
A, their ID no. in B and the various [different] rates per hour in column C.
Depending on the type of work/day their remuneration is calulated at either
1; 1½ or 2 times the hourly rate. I've managed to get the formula to do the
calculation for employee 1 in row 12 - this is my code:

ActiveCell.Formula = "=round((" & Range("C12").Address(False, True) _
& "*" & ActiveCell.Offset(0, -1).Address(False, False) & "),2)"

Currently I copy this formula and paste it in the next rows for the other
employees.
I've tied my best to get the formula to refer to the specific employee's row
no in column C without any luck.
Bottom line - no matter in which column I do the calculation, the rate
remains in column C
Thanks in advance !
 
R

Rick Rothstein

I think you are going to have to give us some more information. Your last
sentence is the one that puzzles me most...

"Bottom line - no matter in which column I do
the calculation, the rate remains in column C"

Why do you think the formula you posted, when placed in other columns, will
change Column C's value? Exactly what are you attempting to accomplish with
your code?
 
J

JLGWhiz

Try this:

ActiveCell.Formula = "=round((" & Range("C12").Address(True,False) _
& "*" & ActiveCell.Offset(0, -1).Address(False, False) & "),2)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top