First column that does not contain "Cucumber"
Hi,
I have 100 columns. How do I find the first column that does not contain any cell with the value "Cucumber". Thanks for any help, Rob |
one way
Sub findnot() For Each c In Range("c6:g6") If ucase(c) < "CUCUMBER" Then MsgBox c.Column: Exit Sub Next End Sub -- Don Guillett SalesAid Software "umop apisdn" wrote in message ... Hi, I have 100 columns. How do I find the first column that does not contain any cell with the value "Cucumber". Thanks for any help, Rob |
Hi
for a formula approach try something like the following array formula (entered with CTRL+SHIFT+ENTER): =MIN(IF(A1:X100="Cucumber",COLUMN(A1:X100)) -- Regards Frank Kabel Frankfurt, Germany umop apisdn wrote: Hi, I have 100 columns. How do I find the first column that does not contain any cell with the value "Cucumber". Thanks for any help, Rob |
All times are GMT +1. The time now is 09:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com