VBA 400 Error

admiral_pelican

New Member
Joined
Jan 18, 2019
Messages
4
Hello,

Can someone take a look at this bad boy and tell me why I'm getting a 400 error?

Please assist.

Sub Macro1()
Dim Rang1 As Range
Set Rang1 = Range("A1")
Dim Row1 As Integer
Row1 = ActiveCell.Row
Dim Sumact As Long
Sumact = Appplication.SumIfs(Worksheets("ERM ").Range("G:G"), Worksheets("ERM ").Range("K:K"), "1", Worksheets("ERM ").Range("B:B"), Rang1.Offset(0, Row1))


MsgBox Sumact


End Sub
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Application is misspelled.

Does worksheet ERM actually have a trailing space in the name?
 
Upvote 0
Wow. Can't believe I missed that Application typo.

Yes, ERM tab has a trailing space in it.

The other error I had was I was putting the row offset as a column offset. Between these two fixes it's good now. Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top