-
I have a web application that generates two different Excel reports with different numbers of leaves and different number of columns, see below.
Report 1
Sheet1 has four columns headed C11, C12, C13, C14
Sheet2 has three columns headed C21, C22, C23Report 2
Sheet1 has four columns headed C11, C12, C13, C14 (same as in Report 1)
Sheet2 has three columns headed C21, C22, C23 (same as in Report 1)
Sheet3 has three columns headed C31, C32, C33, C34, C35,…. -
I want to be able to remove some columns in the reports of two levels that I should enter, see below:
Level 1: Search for Sheet1 and remove the C12 and then
Search for Sheet2 and remove C22, then
Search Sheet3, and remove C32Level 2: Search for Sheet1 and remove the C11 and C13, then
Search for Sheet2 and remove the C21 and C22, then
Search Sheet3, and remove C33, C34, C35 -
I want the macro first asks for the level and then searches for each Sheet and looking forward for each column and remove it as described above.
I have a web application that generates two different Excel reports with different numbers
Share
Use the following code. Run the Macro ‘Choose’ to select the level. This code deletes the entire column where the conditions are true
Please see the file including macro