Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Please help with selecting a range
You didn't name a sheet and a range with the same name, did you?
Sub copynamed()'copy from named rgn to named rng Range("car1").Copy Range("car2") End Sub -- Don Guillett SalesAid Software "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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting the correct number from a range of cells | Excel Worksheet Functions | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Range selecting cells | Excel Discussion (Misc queries) | |||
Selecting a Range | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions |