trying to copy a range -problem in selecting the range

navyaa

Board Regular
Joined
Jul 7, 2002
Messages
223
I am trying to select a cells br3 to bs2000 which are on sheets MACROS and then after selecting them, i filter the columns based on a criteria and then finally i need to copy them over.

This is the code i have but there is some problem as it gives an error while selecting the cells...

Sheets("macros").Select
Range(br3, bs2000).Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="<>0", Operator:=xlAnd
Selection.Copy
ActiveWindow.SmallScroll Down:=-12
Range("BT3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("BR3").Select
Selection.AutoFilter

Please let me know whats wrong with this??
thank you:)
Navya
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
On 2002-10-08 17:24, navyaa wrote:
I am trying to select a cells br3 to bs2000 which are on sheets MACROS and then after selecting them, i filter the columns based on a criteria and then finally i need to copy them over.

This is the code i have but there is some problem as it gives an error while selecting the cells...

Sheets("macros").Select
Range(br3, bs2000).Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="<>0", Operator:=xlAnd
Selection.Copy
ActiveWindow.SmallScroll Down:=-12
Range("BT3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("BR3").Select
Selection.AutoFilter

Please let me know whats wrong with this??
thank you:)
Navya

try a : instead of a , in your range selection
 

navyaa

Board Regular
Joined
Jul 7, 2002
Messages
223
Thank you for your response...

Do you mean i should try using :
Range(br3:bs2000).Select

instead of Range(br3, bs2000).Select ???

I tried it but still gives me an error.

Thank you.
 

johny

Board Regular
Joined
Jul 15, 2002
Messages
69
enter in the range like this
Range("BR3:BS2000").Select
this should do the trick Thanks Johny
 

Forum statistics

Threads
1,144,210
Messages
5,723,047
Members
422,476
Latest member
beck85

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
Top