COPY DATA BETWEEN 2 EVENTS

Victtor

Board Regular
Joined
Jan 4, 2007
Messages
170
Office Version
  1. 365
Platform
  1. Windows
What I need is a formula (or code) that looks for data in column A between two events. (a start event and a stop event)

find the FIRST blank cell in column A. count 5 rows down from this (START EVENT) and grab this data on that entire row and each following row until it reaches the row with TOTAL ITEMS on it (STOP EVENT).

Then repeat the process until it reaches 2 consecutive blank cells, then end program.



blank cell
header
blank cell
hide detail
customer
DATA (start with this row)
DATA
DATA
DATA
total items (STOP BEFORE THIS ROW)


Paste this data in a new sheet.

header
data
data
data

header
data
data
data


etc..
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
It is not very clear to me.
You could put an example using XL2BB tool.
Between the start event and the stop event are there several blank rows?
Or are there several star events and several stop events?
Or there are several texts with "total items".
In your example, you only have one "header" but in the result 2 "header" appear, how is that possible?
I suppose you can create a more representative data sample of what you have and what you expect from the result.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,052
Latest member
Fuddy_Duddy

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