Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
drap copy without increasing the value | Excel Worksheet Functions | |||
How to clear all filters in worksheet for all columns | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Clear Columns Content | Excel Programming |