Dear All ;
I am new to this form, i reached here while searching for the examples of sumif to write code in Excel Macros,
I tried one, can anyone find out whats wrong with it,,
Sub aaa()
'
' aaa Macro
'
cell_no = "I2"
Dim val1 As Long
Range(cell_no).Select
val1 = Application.SumIf(Opening_Bal.Range("b2:b2067"), Physical_Bal.Range("b2"), Opening_Bal.Range("i2:i2067"))
Range("I3").Select
End Sub
when i run the code, it comes to sumif and shows object required,,,
Regards,
Moin
I am new to this form, i reached here while searching for the examples of sumif to write code in Excel Macros,
I tried one, can anyone find out whats wrong with it,,
Sub aaa()
'
' aaa Macro
'
cell_no = "I2"
Dim val1 As Long
Range(cell_no).Select
val1 = Application.SumIf(Opening_Bal.Range("b2:b2067"), Physical_Bal.Range("b2"), Opening_Bal.Range("i2:i2067"))
Range("I3").Select
End Sub
when i run the code, it comes to sumif and shows object required,,,
Regards,
Moin