Hi
I currently use a spreadsheet to record weekly vehicle mileage. I'm looking for a way to automatically delete a column based on a cell value within the column when the vehicle goes off strength
Hi
I currently use a spreadsheet to record weekly vehicle mileage. I'm looking for a way to automatically delete a column based on a cell value within the column when the vehicle goes off strength
Last edited by JamesT1; 05-04-2009 at 02:17 PM. Reason: more information
Hi James,
Can you attach a sample workbook to make us understand your problem better?
--Karan--
Hi Karen
The spreadsheet is too large to attach,,,,, the attachment has a small example.....
If the vehicle in cell "G2" is taken off strength and this cell is blank then I am looking for column G to be automatically deleted
Thanks
What does "taken off strength" mean to us? And what do you mean by "automatically"? That's a very iffy concept.
Click a button and the columns "automatically" delete if appropriate
Change a value in a cell and the column "automatically deletes (crazy thought, IMO.)
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Going by the key phrase "if G2 is blank" I wrote a macro that will delete any column that has blank cell in row2 starting at cell C2.
Your sample sheet had formulas, so when I deleted G2 to make it empty and ran the macro, it did what you wanted, but the formulas in the proceeding columns are broken by that process. FYI.
The on-demand macro is my suggestion, if it were "automatic"...what if you made a mistake? Oops.Please Login or Register to view this content.
Hi JBeaucaire
"Taken Off Strength" means the vehicle has been sold or disposed off,,,,, when this happens I'm looking to delete the column where the weekly miles are kept,........
Hi JBeaucarie
My Apologies,,,,, in a hurray to put the example together and copied the formulas left to right,,, they should be vertical,,,,
many thanks for the code I will try it on my sheet and let you know how I get on
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks