Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clear columns or Drap Columns

I have a sheet with memory intensive calcs. I want the user to enter an
inout stipulating how many columns they are using. I then want a VBA macro
to either drap the columns to that number or conversely delete the columns
after that number.

Assum I have a row which has column counter in it D5:IV5 (i.e. D5 = 1 E5 = 2
etc). And further say the data I want to drag or delete is in D7:IV20. I
want the macro to look at the inputed number (say 10), find this number in
D5:IV5 (M5 or column M). If the current range of data is less than D7:M20,
(say D7:J20) then drag from D7:D20 to M7:M20. If the current range data are
more than D7:M20 (say D7:S20), then delete from S7:S20 to N7:N20.

The goal being to end up with a range which starts with D7 and ends with
approporiate column number you inputted (i.e. 10) - M20.

Does anyone know of an efficient way to do this?

Thanks

EM
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
drap copy without increasing the value jchandler0614 Excel Worksheet Functions 2 January 16th 08 01:11 AM
How to clear all filters in worksheet for all columns Helios Excel Discussion (Misc queries) 2 November 11th 07 11:19 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Clear Columns Content Lizz45ie[_7_] Excel Programming 1 November 3rd 05 04:53 PM


All times are GMT +1. The time now is 09:02 AM.

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"