Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: If cells in a column contain chosen text then print other text in adjacent cell.

  1. #1
    Join Date
    5th October 2011
    Posts
    3

    If cells in a column contain chosen text then print other text in adjacent cell.

    I have a spread sheet that is about 8000 rows. I need code to check if cells in Column D contain certain text (in this case: $50) and if so print this text: ___ $100 into the adjacent cell in Column E.

    D E
    $40
    $30
    $10
    $50 ___$100
    $10
    $50 ___$100

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    26th July 2011
    Posts
    532

    Re: If cells in a column contain chosen text then print other text in adjacent cell.

    Put this formula into E2 and fill down

    =IF(D2="$50","___ $100","")

    Then use copy and paste values

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    5th October 2011
    Posts
    3

    Re: If cells in a column contain chosen text then print other text in adjacent cell.

    Bare with me, I'm a newbie at this.

    That does work, but if I paste the formula down I would have that formula in cells that are not true. Is there a way to setup up layers so that if the statement is false(column B is something other than $50) it would paste another value down? Essentially, I have other values that should be pasted based on the first column.

    I have a feeling that a macro is needed for this.

    $50 ____ $100
    $2
    $70
    $70
    $23

    Please help.

    Thanks in advance.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    19th January 2007
    Location
    South Carolina, USA
    Posts
    9,089

    Re: If cells in a column contain chosen text then print other text in adjacent cell.

    I have other values that should be pasted based on the first column
    Why not provide *ALL* of the details from the start? You'll get a more accurate answer sooner.

    To get the most precise answers, it is best to upload a sample workbook (sensitive data scrubbed/removed) that shows a few manually created examples of the desired results.
    The structure and data types of the workbook must exactly match that of the real workbook. Include in the workbook a clear and explicit explanation of all requirements.The sample workbook only needs to contain enough data to illustrate the need to aid with developing the solution.

    How to edit your post or thread title or upload an attachment

    1. Click the EDIT POST in the gray band immediately below your post
    2. Click Go Advanced
    3. Edit the post or thread title
    4. To upload: scroll down to Manage Attachments -- use ZIP compression if necessary to meet file size limitations
    -----------------------------------------------------

    Maybe you can adapt this:
    =LOOKUP(D2,{10,50,70},{"___If it's ten","____$100","___if it's 70"})

    Replace the "___if it's . . ." with whatever you need. Adjust the number values in the array {10,50,70} as required.
    AAE
    ----------------------------------------------------

    Forum Rules | Message to Cross Posters | How to use Tags

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 5
    Last Post: May 26th, 2011, 14:02
  2. Replies: 15
    Last Post: December 8th, 2010, 22:11
  3. Replies: 1
    Last Post: October 8th, 2009, 13:31
  4. Replies: 11
    Last Post: April 18th, 2008, 06:59

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
  •  
porno