Run time error 84, Attempting to Perform Operation on a Range

stinkingcedar

New Member
Joined
May 2, 2016
Messages
23
Hey guys, here is my code:

Code:
Set Efficiency = Sheets("Sheet1").Range(Sheets("Sheet1").Cells(StartCellRow + 6, StartCellColumn), Sheets("Sheet1").Cells(StartCellRow + 6, StartCellColumn + 21))Set Inefficiency = Sheets("Sheet1").Range(Sheets("Sheet1").Cells(StartCellRow + 8, StartCellColumn), Sheets("Sheet1").Cells(StartCellRow + 8, StartCellColumn + 21))


For Each cell In Array(Efficiency, Inefficiency)


    cell.Value = cell.Value / x


Next cell


EffIff = Efficiency + Inefficiency


EffIff.Copy
Sheets("Sheet2").Range("J4").PasteSpecial Transpose:=True

Having trouble formulating a code that will add these two ranges together, divide by a constant and then paste into another sheet.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
That first long line of code is two lines in the actual code. Also, this is my variable declaration:

Code:
Dim ProjectName As StringDim StartCellRow As Double, StartCellColumn As Double
Dim Start As Range, Efficiency As Range, Inefficiency As Range
Dim EffIff As Range
Dim cell As Range, cell2 As Range
Const x As Long = 1000000
Const y As Long = 1000
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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