I want to create a new column and every time my condition is met with the value of the row directly under said condition. My data is super messy because it's being read from a pdf. There's no other identifiers that would grab those rows of numbers I need or else I'd just use a filter and wouldn't be here. I've included an example of my data and what I would want the output to be if my logic flow isn't clear.
Here's the logic:
IF row above = "LPartner'scapitalaccountanalysis:" THEN output column = row below ELSE do nothing
AND IF row above = "CapitalContributedduringtheyear$" THEN output column + 1 = row below ELSE do nothing
AND IF row above = "YOUREFFECTIVEPERCENTAGEIS" THEN output column + 1 = row below ELSE do nothing
ENDIF
The data repeats every 1000 records or so for 66,000, so all the naming is the same. Essentially I'd want this to repeat for my whole set of data.
Data Output column
| LPartner'scapitalaccountanalysis: | 1 |
| 1 | 2 |
| m | name |
| Beginningcapitalaccount$ | 5 |
mm | 6 |
| Capitalcontributedduringtheyear$ | name 2 |
| 2 | |
| YOUREFFECTIVEPERCANTAGEIS | |
| Name | |
| LPartner'scapitalaccountanalysis: | |
| 5 | |
| m | |
| Beginningcapitalaccount$ | |
| mm | |
| Capitalcontributedduringtheyear$ | |
| 6 | |
| YOUREFFECTIVEPERCANTAGEIS | |
| Name2 | |