+ Reply to Thread
Results 1 to 5 of 5

To copy the contents of a cell and paste it to another cell if certain condition is true

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    USA
    MS-Off Ver
    7
    Posts
    5

    To copy the contents of a cell and paste it to another cell if certain condition is true

    Hi,
    I have a cell which contains a number Off14ch and another cell just above this which contains Off14(Under column named "ID"). Like this i have multiple cells with numbers differing like 14,15,16 etc...I have to search for ch in the column and go to the previous row (which does not have ch) and copy the cell under comment column and append it to the cell under comment column of the row containing the ch.
    I guess we have to make use of the fact that the row will be just above this ch.
    Please see the attached sheet to understand my question better.
    Thanks a lot in advance for help.
    I would be greatful

    Nida
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: To copy the contents of a cell and paste it to another cell if certain condition is tr

    Is ch always going to be the last 2 characters of the string in column A? If so this should work.

    Please Login or Register  to view this content.
    Note - This is the easy solution. We could make it much more fool proof but it would take considerable more work

  3. #3
    Registered User
    Join Date
    10-22-2014
    Location
    USA
    MS-Off Ver
    7
    Posts
    5

    Re: To copy the contents of a cell and paste it to another cell if certain condition is tr

    Hey thanks , this works amazing.Ya the string has ch as last two letters. Could you help me in these two points below if this is done then i would be really good
    I want two changes in the code.
    1. I want the text to be appended before rather then after. ( that is comment text in non-ch row should be appended before the comment text in ch row)
    2. After it has appended the comment before the comment text in the ch row . I want to delete the row which is non-ch. ( That is the row above ch)

    thanks a lot

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: To copy the contents of a cell and paste it to another cell if certain condition is tr

    Updated

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-22-2014
    Location
    USA
    MS-Off Ver
    7
    Posts
    5

    Re: To copy the contents of a cell and paste it to another cell if certain condition is tr

    Thanks a lot. This helped to reduce a lot of manual work.

+ 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. [SOLVED] Copy multiple cell contents to another cell, IF a condition is met
    By sted999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2014, 11:24 AM
  2. Replies: 1
    Last Post: 01-03-2014, 03:01 AM
  3. Replies: 7
    Last Post: 08-09-2013, 09:08 PM
  4. if condition is true then copy the formula in the other cell
    By pedjvak in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-01-2012, 02:05 AM
  5. Copy data from one cell to another if a blank condition is true
    By gadjit in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2009, 08:17 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