I have different datasets and I have to delete the rows below examples.
Dataset 1:
user id | name | country |
nameID | CountryID | |
ABC | 123 |
Dataset 2:
name | user id | country | region |
regionid | |||
nameID | CountryID | ||
ABC | 123 |
What we have to do:
1, We have to search for name id and name id could be in the first column or in the second column
2. Once we find it (user id) we have to remove all the rows from the name id till above (do not remove header)
3. Also we have to remove all the rows from all the columns
4. It should be dynamic
Note: headers from other columns will change
The output of dataset 1:
user id | name | country |
ABC | 123 | |
The output of dataset 2:
name | user id | country | region |
ABC | 123 | ||
I noticed that you still want to keep the origial number of rows. This might be working.
And hope you dont mind the Space in the the column names become Underbar after CrossTab