Extract specific critera and paste in another cell

Kindlysinful

New Member
Joined
Feb 17, 2007
Messages
29
Hello all,
I need to extract certain data from a list that can be anywhere within A2:A6000. I need to only extract the data, (Then paste the results into H2(Pressure), I2(Time) and J2(Date)) that shows a "High" to "Low" pressure change. In the list below you can see that the pressure starts to alternate from 4200 to 10600.
Sorry if this does not format properly, I'm working on a Mac with Office and no add-in seems to work.
Thank you,

A B C H I J
Pressure Time Date Pressure Time Date
8588 15:07:39 9/12/14
8641 15:07:39 9/12/14
8710 15:07:39 9/12/14
8763 15:07:39 9/12/14
8820 15:07:39 9/12/14 Min 0
8877 15:07:39 9/12/14 Max 0
8945 15:07:39 9/12/14 Cycles
9003 15:07:39 9/12/14
9060 15:07:39 9/12/14
9115 15:07:39 9/12/14
9183 15:07:39 9/12/14
9237 15:07:39 9/12/14
9294 15:07:39 9/12/14
9361 15:07:39 9/12/14
9413 15:07:39 9/12/14
9470 15:07:39 9/12/14
9527 15:07:39 9/12/14
9578 15:07:39 9/12/14
9644 15:07:40 9/12/14
9698 15:07:40 9/12/14
9762 15:07:40 9/12/14
9819 15:07:40 9/12/14
9871 15:07:40 9/12/14
9922 15:07:40 9/12/14
9986 15:07:40 9/12/14
10039 15:07:40 9/12/14
10100 15:07:40 9/12/14
10152 15:07:40 9/12/14
10211 15:07:40 9/12/14
10258 15:07:40 9/12/14
10312 15:07:40 9/12/14
10354 15:07:40 9/12/14
10396 15:07:40 9/12/14
10442 15:07:40 9/12/14
10473 15:07:40 9/12/14
10502 15:07:40 9/12/14
10525 15:07:40 9/12/14
10536 15:07:40 9/12/14
10546 15:07:40 9/12/14
10553 15:07:40 9/12/14
10558 15:07:40 9/12/14
10562 15:07:40 9/12/14
10565 15:07:40 9/12/14
10566 15:07:40 9/12/14
10567 15:07:40 9/12/14
10568 15:07:40 9/12/14
10568 15:07:40 9/12/14
10568 15:07:41 9/12/14
10568 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10561 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10567 15:07:41 9/12/14
10564 15:07:41 9/12/14
10526 15:07:41 9/12/14
10452 15:07:41 9/12/14
10355 15:07:41 9/12/14
10277 15:07:41 9/12/14
10179 15:07:41 9/12/14
10097 15:07:41 9/12/14
10003 15:07:41 9/12/14
9921 15:07:41 9/12/14
9820 15:07:41 9/12/14
9744 15:07:41 9/12/14
9658 15:07:41 9/12/14
9556 15:07:41 9/12/14
9477 15:07:41 9/12/14
9391 15:07:41 9/12/14
9289 15:07:42 9/12/14
9208 15:07:42 9/12/14
9106 15:07:42 9/12/14
9018 15:07:42 9/12/14
8922 15:07:42 9/12/14
8836 15:07:42 9/12/14
8733 15:07:42 9/12/14
8654 15:07:42 9/12/14
8568 15:07:42 9/12/14
8464 15:07:42 9/12/14
8387 15:07:42 9/12/14
8299 15:07:42 9/12/14
8196 15:07:42 9/12/14
8117 15:07:42 9/12/14
8030 15:07:42 9/12/14
7930 15:07:42 9/12/14
7849 15:07:42 9/12/14
4261 15:08:12 9/12/14
10604 15:08:16 9/12/14
4260 15:08:19 9/12/14
10588 15:08:23 9/12/14
4260 15:08:26 9/12/14
10599 15:08:30 9/12/14
4259 15:08:33 9/12/14
10608 15:08:37 9/12/14
4259 15:08:41 9/12/14
10590 15:08:44 9/12/14
4257 15:08:48 9/12/14
10588 15:08:51 9/12/14
4256 15:08:55 9/12/14
10590 15:08:58 9/12/14
4255 15:09:02 9/12/14
10581 15:09:05 9/12/14
4255 15:09:09 9/12/14
10576 15:09:13 9/12/14
4254 15:09:16 9/12/14
10571 15:09:20 9/12/14
4253 15:09:23 9/12/14
10594 15:09:27 9/12/14
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
.
.

Try something like this:

Code:
Sub SplitColumnA()

    Dim Rng As Range
    Dim Cell As Range
    Dim Txt As Variant
    
    If TypeName(ActiveSheet) = "Worksheet" Then
    
        On Error Resume Next
        Set Rng = ActiveSheet.Columns("A").SpecialCells( _
            xlCellTypeConstants, _
            xlTextValues)
        On Error GoTo 0
        
        If Not Rng Is Nothing Then
            For Each Cell In Rng
                Txt = Split(Cell.Value, Space(1))
                Cell.Offset(0, 7).Resize(1, 1 + UBound(Txt)).Value = Txt
            Next Cell
        End If
    
    End If

End Sub
 
Last edited:
Upvote 0
Pardon my ignorance but I am not sure how to use this code properly.

I copied the code.
Started and stopped recording a macro.
Opened the macro in VB and pasted the code there.

But from there, I don't know what to do.
 
Upvote 0

Forum statistics

Threads
1,202,901
Messages
6,052,445
Members
444,581
Latest member
naninamu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top