+ Reply to Thread
Results 1 to 4 of 4

formula - if exists

  1. #1
    Registered User
    Join Date
    08-23-2007
    Posts
    30

    formula - if exists

    I have a large file.

    column a = parent_item column c = child_item

    I want to add a column with a formula - if the value in cell for column C exists anywhere in column a - result of formula = 1 if not then 0.

    example -
    Col A Col B Formula Result
    Item A Child A 1
    Item A Child B 0
    Item A Child C 0
    Child A Child D 0
    Child A Child B 0

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: formula - if exists

    =ISNUMBER(MATCH(B1,A:A,0))*1

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    08-23-2007
    Posts
    30

    Re: formula - if exists

    I think this will work quite nicely. I understand how most of it works, but I was wondering why the *1 at end of formula?

    Thank you very much.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: formula - if exists

    ISNUMBER returns either TRUE or FALSE which can be coerced into it's numerical equivalent (0=False, 1=True) by multiplying by 1.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1