Return specific results between two cells then repeat

Blizzardx23

New Member
Joined
Oct 18, 2016
Messages
20
Hi guys!

I'm not new here...I have an older account but no idea what email or username I had back in 2016 (Could have been an old employer email).. sorry =(


So I've done a search and couldn't really come up with what I'm looking to do specifically..

I have a report that provides me with the following information (below)
In this report, it lists (columns) days that payments are past due and the amount past due per job/employee
For the rows, it gives the client name, then below that..it lists the specific employee that worked that job. It then lists client name again with the word "total" at the end.

What I'm wanting to do..is in another worksheet (titled "Dr. Cola Inc. - DROLA") I want it to find "Client Name: Dr. Cola Inc. - DROLA" then list each row/column until it finds the word "Total" at which point, it will stop.

On the next worksheet, it will do the same, but for "Orange Bottom Jeans" (In the worksheet that I've made for that client)



Worksheet 1 has this


[TABLE="width: 400"]
<tbody>[TR]
[TD][/TD]
[TD]NET
[/TD]
[TD]Gross
[/TD]
[TD]30days
[/TD]
[TD]60days
[/TD]
[TD]90days
[/TD]
[TD]120days
[/TD]
[TD]150days
[/TD]
[TD]180days
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Client Name: Dr. Cola Inc. - DROLA
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]STAFFING ------Can Man - Joe Dirt
[/TD]
[TD]$92
[/TD]
[TD]$92
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]92
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Tony Stark
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$57
[/TD]
[TD]$57
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]57
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Harry Toeknee
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$100
[/TD]
[TD]$100
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Tim Taylor
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$10
[/TD]
[TD]$10
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]10
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Alphabet Eddy
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$1000
[/TD]
[TD]$1000
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Lawk Jaw
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$9857
[/TD]
[TD]$9857
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9857
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Needa Lyfe
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$8000
[/TD]
[TD]$8000
[/TD]
[TD][/TD]
[TD]8000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Roger Rabbit
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$600
[/TD]
[TD]$600
[/TD]
[TD][/TD]
[TD][/TD]
[TD]600
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Didyuh Whin
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$54
[/TD]
[TD]$54
[/TD]
[TD][/TD]
[TD]54
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Sally Shameful
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$200
[/TD]
[TD]$200
[/TD]
[TD]200
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Mie Mawm
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$7
[/TD]
[TD]$7
[/TD]
[TD]7
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Dr. Cola Inc. - DROLA Total
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$19,977
[/TD]
[TD]$19,977
[/TD]
[TD]207
[/TD]
[TD]8054
[/TD]
[TD]1600
[/TD]
[TD]9857
[/TD]
[TD]102
[/TD]
[TD]157
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Client Name: Orange Bottom Jeans - ORJNS
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Temp - Rhine Peal
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$564
[/TD]
[TD]$564
[/TD]
[TD][/TD]
[TD]564
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Orange Bottom Jeans - ORJNS Total
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$564
[/TD]
[TD]$564
[/TD]
[TD][/TD]
[TD]564
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Client Name: SillyGurhl Solutions- SLYGRL
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Temp Services - Stukup Silverman
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$16720
[/TD]
[TD]$16720
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]16720
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]SillyGurhl Solutions- SLYGRL Total
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$16720
[/TD]
[TD]$16720
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]16720
[/TD]
[/TR]
</tbody>[/TABLE]




Worksheet 2, I want it to give me these results


[TABLE="width: 400"]
<tbody>[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Client Name: Dr. Cola Inc. - DROLA
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]STAFFING ------Can Man - Joe Dirt
[/TD]
[TD]$92
[/TD]
[TD]$92
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]92
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Tony Stark
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$57
[/TD]
[TD]$57
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]57
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Harry Toeknee
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$100
[/TD]
[TD]$100
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Tim Taylor
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$10
[/TD]
[TD]$10
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]10
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Alphabet Eddy
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$1000
[/TD]
[TD]$1000
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Lawk Jaw
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$9857
[/TD]
[TD]$9857
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9857
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Needa Lyfe
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$8000
[/TD]
[TD]$8000
[/TD]
[TD][/TD]
[TD]8000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Roger Rabbit
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$600
[/TD]
[TD]$600
[/TD]
[TD][/TD]
[TD][/TD]
[TD]600
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Didyuh Whin
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$54
[/TD]
[TD]$54
[/TD]
[TD][/TD]
[TD]54
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Sally Shameful
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$200
[/TD]
[TD]$200
[/TD]
[TD]200
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Customer Service Rep - Mie Mawm
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$7
[/TD]
[TD]$7
[/TD]
[TD]7
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Dr. Cola Inc. - DROLA Total
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$19,977
[/TD]
[TD]$19,977
[/TD]
[TD]207
[/TD]
[TD]8054
[/TD]
[TD]1600
[/TD]
[TD]9857
[/TD]
[TD]102
[/TD]
[TD]157
[/TD]
[/TR]
</tbody>[/TABLE]


Worksheet 3, I want it to give me these results

[TABLE="width: 400"]
<tbody>[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Client Name: Orange Bottom Jeans - ORJNS
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]STAFFING ------Temp - Rhine Peal
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$564
[/TD]
[TD]$564
[/TD]
[TD][/TD]
[TD]564
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 332"]
<tbody>[TR]
[TD]Orange Bottom Jeans - ORJNS Total
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]$564
[/TD]
[TD]$564
[/TD]
[TD][/TD]
[TD]564
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

There has to be a way to *Find "ORJNS"* and then *list all rows/columns through "ORJNS Total"*....right?

I can provide the basic .xls if that helps.

I learned V-Lookup from you guys...you guys are awesome and I definitely appreciate all of your knowledge and desire to help. Thanks :)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How about
Code:
Sub MoveClients()

   Dim Rng As Range
   Dim Ar As Areas
   Dim Sht As String
   
   With Range("A:A")
      .Replace "Client Name", "=xxxClient Name", xlPart, , False, , False, False
      Set Ar = .SpecialCells(xlConstants).Areas
      .Replace "=xxxClient Name", "Client Name", xlPart, , False, , False, False
   End With
   For Each Rng In Ar
      Sht = Rng.Offset(-1).Resize(1, 1).Value
      Sht = trim(Right(Sht, Len(Sht) - InStrRev(Sht, ":")))
      If Not Evaluate("isref('" & Sht & "'!A1)") Then
         Sheets.Add(, Sheets(Sheets.Count)).Name = Sht
      End If
      Rng.Offset(-1).Resize(Rng.Count + 1, 9).Copy Sheets(Sht).Range("A1")
   Next Rng
End Sub
If the client sheet doesn't exist, this will add it
 
Upvote 0
I posted something just now saying that the code above wasn't working...but I deleted a couple of rows that had irrelevant titles and that cleared up the error that I was referring to...so if it shows up (delayed)..please disregard.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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