Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7848399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:11:16+00:00 2026-06-02T18:11:16+00:00

I have a log list of data with the first two columns as potential

  • 0

I have a log list of data with the first two columns as potential identifiers, as shown in shortened form in the image at Flickr (noobie – can’t post pictures):

http://farm8.staticflickr.com/7036/7114053281_30bf57300d.jpg

I have already sorted based on value Column B. I would like to be able to split this long set of data into separated lists of the four columns, with a single list containing one “Spot ID”, like this:

http://farm9.staticflickr.com/8160/6967974902_7f84b57e46.jpg

Column A “Frame #” is not critical, but I left it in since I wondered if it could be used to make the macro easier to run.

I have to process a lot of data like this, so I want to understand how I can modify the macro to send the separate lists to different sheets, rather than different columns, for instance.

In case you are wondering, the Frame # refers to a video micrograph frame, and the spot ID refers to a specific colloidal particle that was tracked. X Pos and Y Pos are X and Y coordinates, respectively.

Any help is much appreciated.

nan0guy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:11:18+00:00Added an answer on June 2, 2026 at 6:11 pm

    Try this, it uses a simple AUTOFILTER to get each row with the unique SPOT ID, the onlyh thing it doesn’t do is keep the … … …. … row in the middle, hopefully that’s not actually critical.

    Option Explicit
    
    Sub SplitColumns()
    Dim c As Range, wsNEW As Worksheet, NC As Long, LR As Long
    Dim List As New Collection, Item As Variant
    
    With ActiveSheet
        .AutoFilterMode = False       // turn autofilter off
        LR = .Range("A" & .Rows.Count).End(xlUp).Row        //count cells in A 
    
        On Error Resume Next        //on error, continue on next line
        For Each c In .Range("B:B").SpecialCells(xlConstants, xlNumbers) //Help here?
            //doing something to the values in column B (the Spot IDs)
            List.Add c.Value, CStr(c.Value)        //Make a list of values in column A in c
        Next c        //For-next loop
        On Error GoTo 0
    
        .Rows(1).AutoFilter        //turn autofilter on?
        Set wsNEW = Sheets.Add        //add a new sheet
        NC = 1        //counter for columns in new sheet
    
        For Each Item In List        //exactly, but where does Item come from?
            .Rows(1).AutoFilter Field:=2, Criteria1:=Item //autofilter using Item as criteria
            .Range("B1:D" & LR).Copy wsNEW.Cells(1, NC)  //copy everything in the range to new column in new sheet
            NC = NC + 3        //iterate column by 3
        Next Item        // for-next loop
    
        .AutoFilterMode = False        // turn autofilter off
    End With
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a listview which is filled with data form sqlitedatabase. A list-view element
Have dict like: mydict= {'a':[],'b':[],'c':[],'d':[]} list like: log = [['a',917],['b', 312],['c',303],['d',212],['a',215],['b',212].['c',213],['d',202]] How do i
I have a log of following format << [ABC] some other data some other
I have a log in form on my app. Once a correct user name
I have a database where I store two different kinds of data. One table
I have made a MatrixCursor for accessing my data. It has 4 columns. And
I have JSON data which contents Strings and Image URLs, and I already parse
I have an OpenGL application, where I fill a two dimensional int List with
I have a webpage with different elements (a list of links and two select
i have all my students data in s variable i.e first name,last name,id. which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.