varesources
asked on
Excel - Multiply two cells go to next row?
I have over a thousand rows in an excel sheet. Column w needs to multiply by column v and place the answer in column y. Repeat until there is no more data in v or w. I know this is going to be a simple answer but I can't seem to find it. Thanks!
Oh, and I need it in a macro.
Oh, and I need it in a macro.
In cell W1 type
=v1*w1
and then press enter
select cell W1 again
There is a tiny square at the bottom right corner of the selected cell
drag this cell as far down as necessary
Saqib
=v1*w1
and then press enter
select cell W1 again
There is a tiny square at the bottom right corner of the selected cell
drag this cell as far down as necessary
Saqib
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sid,
I get an error that says Run-time error '13':
Type mismatch.
End Debug Help
This row is highlighted when I click debug
ws.Range("Y" & i).Value = ws.Range("W" & i).Value * ws.Range("V" & i).Value
I get an error that says Run-time error '13':
Type mismatch.
End Debug Help
This row is highlighted when I click debug
ws.Range("Y" & i).Value = ws.Range("W" & i).Value * ws.Range("V" & i).Value
Change
ws.Range("Y" & i).Value = ws.Range("W" & i).Value * ws.Range("V" & i).Value
To
ws.Range("Y" & i).Value = Val(ws.Range("W" & i).Value) * Val(ws.Range("V" & i).Value)
Sid
ws.Range("Y" & i).Value = ws.Range("W" & i).Value * ws.Range("V" & i).Value
To
ws.Range("Y" & i).Value = Val(ws.Range("W" & i).Value) * Val(ws.Range("V" & i).Value)
Sid
Try mine :) a bit late, but tested with sample spreadsheet attached
Dave
Dave
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sid yours worked just fine.
Dave I'm in a hurry and didn't get a chance to try it buy I will award you some points for the effort. Thanks!
Dave I'm in a hurry and didn't get a chance to try it buy I will award you some points for the effort. Thanks!
Open in new window
Sid