Help fixing a code

Xineq

New Member
Joined
Aug 29, 2014
Messages
34
Hey mr excel

i'm atm working on this code:

Code:
If Sheets("Counting").Range(i, "R").Value = Sheets("Overview 2014-4").Range("Q1").Value Then
        Sheets("Counting").Range("S:W").Row.Copy Destination:=Sheets("Overview 2014-4").Cells(Rows.Count, "Q").End(xlUp).Offset(1, 0)
    End If


  • First part of the code, will seach my counting and see if any data in my R column is equal to my overview 2014-4 Q1 data.
  • Next up if its a match, it will copy the data from (S to W) in that row and then past it in my overview 2014-4 the last row of

I just cant get it to work any help will be great :)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try this...

Code:
[color=darkblue]If[/color] Sheets("Counting").Range(i, "R").Value = Sheets("Overview 2014-4").Range("Q1").Value [color=darkblue]Then[/color]
    Sheets("Counting").[B]Rows(i).Range("S1:W1")[/B].Copy Destination:=Sheets("Overview 2014-4").Cells(Rows.Count, "Q").End(xlUp).Offset(1, 0)
End [color=darkblue]If[/color]
 
Upvote 0
Hey AlphaFrog

Sorry for the late feedback, i triede your code, and it gives me the error message 1004, "Application-Defined or object-defined error" in the first line of code.

Thx for the help so far :)
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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