+ Reply to Thread
Results 1 to 4 of 4

If a cell above contains a word

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    If a cell above contains a word

    Hi there, in column A I have a list of words.

    I column B I have a formula that will return either a 1 or a 0 based on if the adjacent cell in A is populated.

    Somewhere in column A there will be a cell called "END" - is it possible to ensure that any row below the cell containing "END" has a 2 inserted?

    I have inserted an example (without the formula)
    Attached Files Attached Files

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: If a cell above contains a word

    I create a formula for the 1st cell in column B and then a different formula for the rest...it seem to do what you are asking for....
    Attached Files Attached Files
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,529

    Re: If a cell above contains a word

    Row 1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: If a cell above contains a word

    Maybe this will work for you:

    A
    B
    1
    2
    apple
    1
    3
    orange
    1
    4
    banana
    1
    5
    grape
    1
    6
    end
    1
    7
    grape
    2
    8
    orange
    2
    9
    10
    11
    =IF(A2="","",IF(A1="end",2,IF(B1=2,2,1)))
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 05-28-2014, 05:57 AM
  2. Check cell for word, If word exists in cell, assign that cell to corresponding category.
    By Trevasaurus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 12:35 PM
  3. [SOLVED] How can I replace a word from a sentence in a cell & substitute word from another cell
    By rionoah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 08:44 AM
  4. export cell contents to Word fields in a protected Word document
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2011, 09:31 AM
  5. Replies: 6
    Last Post: 02-24-2010, 07:07 AM

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