+ Reply to Thread
Results 1 to 13 of 13

Need an help of vba code to split data from col F:F depends upon list of short keys values

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Need an help of vba code to split data from col F:F depends upon list of short keys values

    Dear experts


    i need a vba code help to split col values depends upon criteria key value then select only matching values move to another sheet
    pls refer the short keys list out in J column

    splited data has to move on sheet Brick_Data. if data already need to clear old data then paste

    please find the attachment

    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Try this one

    Please Login or Register  to view this content.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    data should be deleted after copy into sheet
    Please Login or Register  to view this content.
    Last edited by sintek; 10-17-2022 at 11:03 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Hi brother thanks for code it works perfectly, i need small changes with formula you done!! replace with vlookup formula "=VLOOKUP(RC[-2],vlookupdata!C[-5]:C[-4],2,0)" in F column then paste only result data to Brick_Data avoid N/A's

    i should open new thread but your code its look like easy for me to changes when ever i want if you teach me once time
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Hello. In the attached variant:

    - First, VLOOKUP is applied to column F.
    - And then the information is distributed between the sheets 'Brick_Data' and 'The rest'.
    - The 'Master' and 'vlookupdata' sheets are not modified in order to be able to do a "cross control".

    PHP Code: 
    For 2 To Q
      
    If Not IsError(a(i6)) Then
        T 
    0
        
    For 1 To UBound(kv): InStr(a(i6), kv(j1)): Next
        
    If 0 Then
          R
    (1) = R(1): b(1)(R(1), 1) = i
        
    Else
          
    R(2) = R(2): b(2)(R(2), 1) = i
        End 
    If
      
    End If
    Next
    ws 
    = Array("Brick_Data""The rest"): ReDim Preserve ws(1 To 2)
    For 
    1 To 2
      With Sheets
    (ws(j))
        .[
    a1].CurrentRegion.Offset(1).Delete xlShiftUp
        
    .Range("A2:F2").Resize(R(j)) = Application.Index(ab(j), Array(123456))
        .
    Range("A1").CurrentRegion.Columns.AutoFit
      End With
    Next 
    Attached Files Attached Files

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Hi brother thanks for code it works perfectly, i need small changes with formula you done!! replace with vlookup formula
    Not sure who you are referring...
    Please Login or Register  to view this content.
    Last edited by sintek; 10-19-2022 at 01:25 AM.

  7. #7
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Hi brother @sintek the vlookup u added its copy entire data set into sheet Brick_Data , its should be `158 data but its copy 174 data's
    thanks

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Oops...my bad...Should be column 6 special cells...see amended...

  9. #9
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Just one question: did you get to read message #5?...

  10. #10
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Also post 2…

  11. #11
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    Quote Originally Posted by beyond Excel View Post
    Just one question: did you get to read message #5?...
    Quote Originally Posted by JEC. View Post
    Also post 2…
    I'm not sure if MicroTees realized that it's been 3 people trying to help him.

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    I'm not sure if MicroTees realized that it's been 3 people trying to help him.
    Sadly this often happens on the forum...Users don't realize the impact that the alternative|multiple solutions that are offered can benefit them in the long run...

  13. #13
    Forum Contributor
    Join Date
    06-10-2014
    Location
    CANADA
    MS-Off Ver
    2016
    Posts
    118

    Re: Need an help of vba code to split data from col F:F depends upon list of short keys va

    hi experts sorry for late reply i logged out couple of days it~solved Thanks for all

+ 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. Help on VBA Code to split rows into newwb depends upon cell criterial
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2022, 12:49 AM
  2. [SOLVED] VBA Code to list values in 3 text boxes from 2 sheet depends upon 3 list box values
    By MicroTees in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2022, 02:49 AM
  3. [SOLVED] Code for split table to 2 tables with Keys
    By dageci in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-28-2019, 05:08 AM
  4. [SOLVED] need vba to split data move to particular file sheet depends upon sheetname
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-06-2016, 03:05 AM
  5. need vba code to split rows to closed wb shets depends company code met with sht name
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2016, 12:44 PM
  6. [SOLVED] need vba code to condition dropdown list and move data depends upon week or month in comb
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-01-2014, 03:28 AM
  7. Vba macro to split the data to three sheets depends upon single & repeats
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2013, 10:54 AM

Tags for this Thread

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