+ Reply to Thread
Results 1 to 11 of 11

extracting data form and adjecent cell based on cell content.

  1. #1
    Registered User
    Join Date
    02-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    extracting data form and adjecent cell based on cell content.

    Hello, I need to extract data form a column based on value of a cell, column "B" has an "item Code", i want to get that item code and insert that into column "A" as shown on sample worksheet, now, if i can also add a blank row above each cell containing this value it would be great, if cell on column "B" has "FS" or "R" i want to place it on column "A" as shown.
    test data.xlsx

  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: extracting data form and adjecent cell based on cell content.

    Still using Excel 2010???
    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
    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: extracting data form and adjecent cell based on cell content.

    I do NOT understand.

    Why are there values in A10-A14?

    There is an R in A8. Why does that not count?

    What do you expect to see in (a few) rows BELOW the red row?

    YOU know what you're looking at. WE don't. You need to explain the issue completely.

  4. #4
    Registered User
    Join Date
    02-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: extracting data form and adjecent cell based on cell content.

    last time you helped me with a different issue, I this all if this manually, we added a lot more items since then.
    Thank you.

  5. #5
    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: extracting data form and adjecent cell based on cell content.

    And how does it differ from your LAST thread. I helped you with one 2 threads ago.

  6. #6
    Registered User
    Join Date
    02-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: extracting data form and adjecent cell based on cell content.

    replying again, last time, you helped me extracting values based on item number entered on a different worksheet, if i entered "10FS-1173" it would pull contents adjacent to rows containing that value.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: extracting data form and adjecent cell based on cell content.

    Perhaps this will help.
    1. Column A is populated using: =IF(OR(MID(B2,3,2)="fs",MID(B2,3,1)="r"),B2,IF(OR(B2="",LEFT(B2,1)="m",LEFT(B2,1)="s"),"",INDEX(A$1:A1,AGGREGATE(14,6,ROW(A$1:A1)/(A$1:A1<>""),1))))
    2. A red border is drawn between sections using: =AND($A2<>"",$A3<>"",$A2<>$A3)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    02-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: extracting data form and adjecent cell based on cell content.

    This is great! thank you very much, now would it be possible, instead if drawing red line, to leave a blank row, this will create separation from "item block" to "item block".

    Thanks again!!!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: extracting data form and adjecent cell based on cell content.

    I believe that it would require VBA to insert the blank rows in columns A:E, however using formulas a range with blank rows could be produced in another set of columns such as H:L.
    1. Populate cell F1 with the number 1
    2. Populate cells F2 and down using: =IF(AND($A1<>"",$A2<>"",$A1<>$A2),SUM(F1,2),SUM(F1,1))
    3. Populate columns H:L using: =INDEX(A$2:A$4252,MATCH(ROW(),$F$2:$F$4252,0))
    4. Apply the following custom formatting to columns H:L General;;
    5. Apply the following conditional formatting to columns H:L =ISNA(H2)
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-12-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: extracting data form and adjecent cell based on cell content.

    This works! thank you very much!!

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: extracting data form and adjecent cell based on cell content.

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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: 5
    Last Post: 07-07-2014, 11:52 AM
  2. Replies: 0
    Last Post: 06-19-2014, 04:20 PM
  3. conditionally enter data in a cell based on content of another cell
    By jrustebakke in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2014, 02:47 PM
  4. copying cell content into a specific workbook based on the content in that cell
    By krishna reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2012, 03:52 AM
  5. Copy duplicates to form based on cell content
    By greggc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2011, 07:23 AM
  6. Replies: 2
    Last Post: 12-19-2006, 10:50 PM
  7. Extracting data based on content
    By loopkid1 in forum Excel General
    Replies: 5
    Last Post: 03-07-2006, 11:08 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