We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Delete all rows between two specific words

AlisaTre
5 - Atom

Dear all, 

 

Thanks for your help!

 

I have many different Excel files that I have already merged (one below the other). They all have exactly the same format (only the number of rows is different).

 

The Excel files contain trial balances and I only need to filter out the balance sheet accounts. As there is no specific identifier for this, I want to delete all the rows between the words "revenue" and "net result" in order to get rid of the income statement accounts.

 

Do you have any idea? 

 

Thanks for your help!

 

Best, 

 

Alisa 

 

 

2 REPLIES 2
PangHC
13 - Pulsar

use multiple rows tool to mark the rows. then use filter to delete it.

 

in multiple rows. create a field calls "delete"

if [row-1:date] = "net result" then
  "keep"
elseif [data] = "revenue" then 
  "delete"
else 
  [row-1:delete]
endif

 then filter

[delete] != "delete"
AlisaTre
5 - Atom

Thank you very much :)

Labels
Top Solution Authors