ReDim variable variable Case statement

MadeleineB

New Member
Joined
Sep 23, 2008
Messages
18
For each different case I want the variable ColumnPaste to change to a different column, but its not working. Is using ReDim right or can I do it another way?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I'm declaring it ReDim ColumnPaste("")<o:p></o:p>
<o:p></o:p>
The part of my code with the case statment is:<o:p></o:p>
<o:p></o:p>
Select Case KM

Case "78", "79", "80", "81", "82"
ReDim ColumnPaste(H) 'CHANGE WITH EACH Case

Sheets("Summary").Select
Sheets("Summary").Range(ColumnCut & RowS).Cut
Sheets("Summary").Range(ColumnPaste & RowS).Select
ActiveSheet.Paste

Case "84", "85", "85", "87", "88"
ReDim ColumnPaste(I) 'CHANGE WITH EACH Case

Sheets("Summary").Select
Sheets("Summary").Range(ColumnCut & RowS).Cut
Sheets("Summary").Range(ColumnPaste & RowS).Select
ActiveSheet.Paste<o:p></o:p>
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Yep that works, I think I was trying to over complicate things.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Thanks<o:p></o:p>
<o:p> </o:p>
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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