Find data below a blank cell in between 2 words

ceclay

Board Regular
Joined
Dec 4, 2019
Messages
58
Office Version
  1. 2016
Platform
  1. Windows
I have this table below wherein I would like to get the data below the blank cell in between "Participant" and "Close"

Note: <> means Blank Cell


<>​
103
105
Open
<>
Participant
<>
Heather
103
105
<>
Lawrence
102
<>
Judel
105
1042
<>
Close
<>​
Open

I have this code below but It will also get the data beyond the "Participant" and "Close"

VBA Code:
Sub Golf()
Application.ScreenUpdating = False
Dim Sh As Worksheet, Sr As Range, Sf As Range, wA As Variant
Dim Sf1 As Range, wA1 As Variant
Const FindWhat As String = ""
Set Sh = Sheets("Golf Paste Here")
  Set Sr = Sh.Range("A1:A80000")
sRow = 2
  Set Sf = Sr.Find(FindWhat, , xlValues, xlPart)
  If Not Sf Is Nothing Then
    cell = Sf.Address
    Do
      wA = Sf.Resize(2, 1).Value
      With Sheets("Sheet2")
        .Range("A" & Rows.Count).End(xlUp)(2).Resize(2, 1).Value = wA
        .Range("C" & sRow).Resize(1, 2).Value = Application.Transpose(wA)
        sRow = sRow + 1
      End With
      Set Sf = Sr.FindNext(Sf)
    Loop While Not Sf Is Nothing And Sf.Address <> cell
  End If
Application.ScreenUpdating = True
End Sub
 
Now, I have this table below wherein I would like to get the data below
Hello, with pleasure I continue to support you, but before continuing with the new request, could you comment, the macro from post #4 resolved your request from post #3?
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello, with pleasure I continue to support you, but before continuing with the new request, could you comment, the macro from post #4 resolved your request from post #3?
Hi. Yes its correct. But when i tried to plugged it on reply #7 im not sure why i am having an error.
 
Upvote 0
Hi. Yes its correct. But when i tried to plugged it on reply #7 im not sure why i am having an error.
The layout of post #3 is different from post #7, even the output is completely different.
That is why the macro does not work. For the new you require, you need a new macro.
 
Upvote 0

Forum statistics

Threads
1,216,086
Messages
6,128,734
Members
449,466
Latest member
Peter Juhnke

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