• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Multiply two variable values in VBA

Farout.DD

New Member
Hi All,
Can anyone help with what basics I am missing from this code, i keep getting type mismatch for .

>>> use code - tags <<<
Code:
cell = cell.Value * Sheets("invoicesforxero").Range("H" & current)


Sub place_line_total_for_xero_spreadsheet()
For Each cell In Sheets("invoicesforxero").Range("G1:G7")
current = cell.Row
cell = cell.Value * Sheets("invoicesforxero").Range("H" & current)
MsgBox cell
Next
End Sub

Many thanks in advance.
 
Last edited by a moderator:
Farout.DD
You could test something like below
Code:
Sub place_line_total_for_xero_spreadsheet()
    For Each cell In Sheets("invoicesforxero").Range("G1:G7")
        MsgBox cell.Value * Sheets("invoicesforxero").Range("H" & cell.Row)
    Next
End Sub
 
Back
Top