View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default VBA Help to replace If formula

You could just look for Equip in the filed, like so

=IF(ISNUMBER(SEARCH("equip",A1)),"EQUIP","")

or

=IF(ISNUMBER(FIND("Equip",A1)),"EQUIP","")

if it needs to be case sensitive.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Hoshyar" wrote in message
...
Hi All,

Column "A" is a category column, I always choos from a drop down list

these
categories " Security Equip, IT Equip, HSE Equip, Comms Equip, Ops Equip"

in
column "A".

Whenever these categories appears in column "A", I want to give them one
name for all of them in cluumn "K", such as "EQUIP". is it possible to do
that automatically?

currently I am using this formula in each cell in clumn "K"

=IF(A1="Office Equip","EQUIP",IF(A1="Comms. Equip","EQUIP",IF(A1="Security
Equip","EQUIP",IF(A1="Vehicles Equip","EQUIP",IF(A1="Ops
Equip","EQUIP",IF(A1="SHE Equip","EQUIP",IF(A1="IT

Equip","EQUIP","")))))))

But this is a very long formla and it increases the size of my spread

sheet.

Your help is appreciated
Best regards
Hoshyar