+ Reply to Thread
Results 1 to 13 of 13

How to insert a new role if the content in the cell is different value

  1. #1
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    How to insert a new role if the content in the cell is different value

    I would like to know how to insert a new role if the content in the cell in the particular column is different value. Attached is the example image of worksheet.
    If the value in the adjacent row in the colum E is different value, I want to insert a new role. How to do it fast?

    sample.jpgsample.jpg

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to insert a new role if the content in the cell is different value

    A blurry screenshot is of no use.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Attached is the image file
    Attached Images Attached Images

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to insert a new role if the content in the cell is different value

    I asked for an Excel sheet... not for another picture of one.

  5. #5
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Attached is the excel file
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to insert a new role if the content in the cell is different value

    OK. Now I can see what is happening!!! I just don't understand your request...

    In E2 there is the value 002A. Which cell am I supposed to be comparing this to? What do you want to see in which cell??


    You really are not doing very much to enable me to help you!!

  7. #7
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Sorry about that. Please use the new attached excel sheet. You can see that in column E some cells have same value. I want to group those rows with same value in column E and insert new roles when two adjacent rows have different value. Please refer to the attached excel sheet.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Hi Glenn,
    Thanks for looking at my problem. I have attached the excel sheet. Please help to look into this

  9. #9
    Registered User
    Join Date
    05-10-2015
    Location
    cairo
    MS-Off Ver
    2013
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    so I will start from E18 and down .. please follow these steps

    in cell F19 write this formula =E19=E18
    in cell G20 write this formual =E20=E19

    select the 4 cell from F19 to G20 and then drag and copy the formulas down till the end of data

    this will give you alternated true and false results

    now select column F & G and copy them .. then paste them as values only

    press ctrl+F to find and search for "false"

    press find all

    then Ctrl + A to select all search results

    you will see all the false highlighted

    now from the home ribbon choose insert >> sheet rows

    it will insert a sheet row in each change of numbers .. now you can delete the true and false from column F & G
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to insert a new role if the content in the cell is different value

    I looked at this yesterday... and still didn't understand what you want. I've looked again now and can see what you need. I doubt if it can be done without VBA. My suggestion to you is that you mark this thread as solved and start a new one in the VBA sub-forum. Attach a file with 2 sheets in your new post. One with your raw data and another with 10 or so rows showing the desired results that way, it will a) be in the best place to get an answer and b) have zero replies, which is very often the first thing that we look for when we are wanting to find a problem to solve.

    Regards,

    Glenn

  11. #11
    Registered User
    Join Date
    05-10-2015
    Location
    cairo
    MS-Off Ver
    2013
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Hey Glenn,


    What is wrong with my solution that doesn't require VBA ??!

  12. #12
    Registered User
    Join Date
    05-14-2017
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: How to insert a new role if the content in the cell is different value

    Hi Sasoona,

    Thanks for your solution. That will solve the problem. I think I also want to know how to do it using VBA.
    If I want to do multiple excel files, I think I need VBA.

    Hi Glenn,
    Please guide me how to do it in VBA.
    The link in VBA forum >> https://www.excelforum.com/excel-pro...ml#post4657695
    Last edited by Archimedes79; 05-18-2017 at 09:05 AM.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to insert a new role if the content in the cell is different value

    Sasoona. 1. I didn't see your answer until now. 2. I am roaming on a very slow metered connection and am not going to download a 1 Mb file. 3. I would not download a pdf anyway, This is an Excel Forum. Why not attach an Excel file?

    Archimedes 79. I don't use VBA. That is why I suggested you close this thread and start another.
    Glenn

+ 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. Loop to insert picture corresponding to content of a cell
    By kisnah in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-27-2015, 10:22 PM
  2. [SOLVED] Split name and role, get rid of parentheses ex: Last, First (Role)
    By James Keuning in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-02-2014, 01:03 PM
  3. [SOLVED] Macro to insert a new row whenever the cell content changes
    By m4luke in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-23-2013, 08:13 AM
  4. Insert cell content into a shape
    By anmck in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2011, 02:50 PM
  5. How do you insert a cell's content in the middle of the sentence?
    By simpleonline1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2010, 02:56 PM
  6. [SOLVED] insert the content of a cell into a header/footer
    By subscriptionsink in forum Excel General
    Replies: 1
    Last Post: 05-26-2005, 05:15 PM
  7. Insert a - in the cell content
    By sam76210 in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 03:11 PM

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