Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Column
Hi,
Can anyone tell me is it possible to delete a coulmn based upon what is shown in a specific cell, I have a worksheet that in perhaps either A1 or B1 or C1 the word CLIENT might appear, in whichever column the word appears I want to delete that column, I can find lots on deleteing rows but nothing on deleting columns (is it similar?). Thanks for the help, Phil |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Column
Simple way
If Range("A1").Value = "CLIENT" Then Columns(1).Delete ElseIf Range("B1").Value = "CLIENT" Then Columns(2).Delete ElseIf Range("C1").Value = "CLIENT" Then Columns(3).Delete End If -- HTH Bob Phillips "Phil" wrote in message ... Hi, Can anyone tell me is it possible to delete a coulmn based upon what is shown in a specific cell, I have a worksheet that in perhaps either A1 or B1 or C1 the word CLIENT might appear, in whichever column the word appears I want to delete that column, I can find lots on deleteing rows but nothing on deleting columns (is it similar?). Thanks for the help, Phil |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Column
If you only have one you could use this. For multiples, post back
Sub findanddelete() Columns(Rows(1).Find("client").Column).Delete End Sub -- Don Guillett SalesAid Software "Phil" wrote in message ... Hi, Can anyone tell me is it possible to delete a coulmn based upon what is shown in a specific cell, I have a worksheet that in perhaps either A1 or B1 or C1 the word CLIENT might appear, in whichever column the word appears I want to delete that column, I can find lots on deleteing rows but nothing on deleting columns (is it similar?). Thanks for the help, Phil |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Column
Hi,
Thanks for the help with this, if I have multiple finds in my row, to explain, if I have a row like A1, B1, C1, and I am looking for the words CLIENT or CONTACT in either A1, B1, C1, do I seperate the find out something like Find("client","contact") Thanks again, Phil "Don Guillett" wrote: If you only have one you could use this. For multiples, post back Sub findanddelete() Columns(Rows(1).Find("client").Column).Delete End Sub -- Don Guillett SalesAid Software "Phil" wrote in message ... Hi, Can anyone tell me is it possible to delete a coulmn based upon what is shown in a specific cell, I have a worksheet that in perhaps either A1 or B1 or C1 the word CLIENT might appear, in whichever column the word appears I want to delete that column, I can find lots on deleteing rows but nothing on deleting columns (is it similar?). Thanks for the help, Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy column header to next column, delete & delete every nth colum | New Users to Excel | |||
delete cells column. Delete empty cells | Excel Worksheet Functions | |||
How do I delete everything after a / in a column? | Excel Worksheet Functions | |||
Delete All Rows That Column A value is not in Column A of Sheet2 | Excel Programming | |||
Delete a Row if a Certain Value is in Column C | Excel Programming |