select case syntax???

Pesky_Weasel

Board Regular
Joined
Sep 28, 2002
Messages
99
Dear All,

I have a select case statement to try to select a range of cells (to copied and pasted elsewhere). I have declared rng as Range
~~~~~~~~~~~~excerpt~~~~~~~~~~~~
Select Case jd
Case "Worker"
rng = Range(("data!b4"), Range("data!c192"))
Case "Manager"
rng = Range(("data!d4"), Range("data!e192"))
Case "Host"
rng = Range(("data!f4"), Range("data!g192"))
Case "Host Supervisor"
rng = Range(("data!h4"), Range("data!i192"))
Case "Executive Manager"
rng = Range(("data!j4"), Range("data!k192"))

End Select

~~~~~~~~~excerpt~~~~~~~~~~~~

This does not seem to work.
Please let me know how badly i have screwed up the syntax.

Thanks for looking
Weasel
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You have to use the SET command when declaring a range

Set mg = Range("A1")

Did this do the trick?
 
Upvote 0
Phantom,

I did try this once but probably screwed the syntax up for that too. I will try again later and repost if no good.

Thanks for the help
Weasel
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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