Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Please help with selecting a range

Hi,

I have this code;

Sub dump()

Sheets("raw1").Select
Range("car1").Select
Selection.Copy
Sheets("car1").Select
Range("a1").Select
Selection.Paste
End Sub

All I am looking to do is to select a named range and copy and paste to
another sheet. However on the Range("car1").Select line i get an
error;

Run time error 1004, Application defined or object defined error

I originally thought this would be a problem with the name of the
range, but I have tried naming a single cell as a range "pink" for
example! and it still doesn't work.

Any clues?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 303
Default Please help with selecting a range

to select a named range I have used
application.goto reference:="car1"
selection.copy

greetings from New zealand

"keri" wrote in message
oups.com...
Hi,

I have this code;

Sub dump()

Sheets("raw1").Select
Range("car1").Select
Selection.Copy
Sheets("car1").Select
Range("a1").Select
Selection.Paste
End Sub

All I am looking to do is to select a named range and copy and paste to
another sheet. However on the Range("car1").Select line i get an
error;

Run time error 1004, Application defined or object defined error

I originally thought this would be a problem with the name of the
range, but I have tried naming a single cell as a range "pink" for
example! and it still doesn't work.

Any clues?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Please help with selecting a range


Thanks! (Did you watch NewZealand win the motor racing this weekend?)

I now want to do an action for only odd numbered integer. So where my
code would normally say;

Dim i as integer
For i = 1 to 20

I only want it to apply to 1,3,5,7 etc

Is this possible?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Please help with selecting a range

Have you created an Excel Defined Names for car1?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"keri" wrote in message
oups.com...
Hi,

I have this code;

Sub dump()

Sheets("raw1").Select
Range("car1").Select
Selection.Copy
Sheets("car1").Select
Range("a1").Select
Selection.Paste
End Sub

All I am looking to do is to select a named range and copy and paste to
another sheet. However on the Range("car1").Select line i get an
error;

Run time error 1004, Application defined or object defined error

I originally thought this would be a problem with the name of the
range, but I have tried naming a single cell as a range "pink" for
example! and it still doesn't work.

Any clues?

Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Please help with selecting a range

As a ex open wheel road racer who likes to watch A1 racing when Speed shows
it,
For i = 1 to 20 step 2


--
Don Guillett
SalesAid Software

"keri" wrote in message
ups.com...

Thanks! (Did you watch NewZealand win the motor racing this weekend?)

I now want to do an action for only odd numbered integer. So where my
code would normally say;

Dim i as integer
For i = 1 to 20

I only want it to apply to 1,3,5,7 etc

Is this possible?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Please help with selecting a range

My other half is data engineer for the NZ team! I had a wicked weekend
celebrating for them!

Thanks for the integer answer.

Anyway, no I realised my mistake with the sheet names and changed them.

What is an Excel Defined Name?

(In case you're wondering i've learnt basic VBA in Access but never
used Excel before....it's certainly interesting trying to make Access
knowledge work on this).

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Please help with selecting a range

A couple of ways
1. Select a rangeinsertnamedefinename it
1.a define it in the formula is box
2. select a rangetype in a name in the NAME box next to the formula box

--
Don Guillett
SalesAid Software

"keri" wrote in message
ps.com...
My other half is data engineer for the NZ team! I had a wicked weekend
celebrating for them!

Thanks for the integer answer.

Anyway, no I realised my mistake with the sheet names and changed them.

What is an Excel Defined Name?

(In case you're wondering i've learnt basic VBA in Access but never
used Excel before....it's certainly interesting trying to make Access
knowledge work on this).



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting the correct number from a range of cells pajones via OfficeKB.com Excel Worksheet Functions 4 September 18th 06 04:04 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Range selecting cells Alec H Excel Discussion (Misc queries) 2 March 14th 06 01:36 PM
Selecting a Range SJT Excel Discussion (Misc queries) 2 March 8th 06 07:30 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM


All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"