NewOrderFac33
Well-known Member
- Joined
- Sep 26, 2011
- Messages
- 1,283
- Office Version
- 2016
- 2010
- Platform
- Windows
Good afternoon,
I am filtering an Excel database on column A, within a For Each loop using a list of unique Column A items located on another worksheet.
This all works fine and results in one or more rows being displayed for each item.
Column AB always contains the same value for each filtered set and I now need (providing that the filter returns more than one row) to erase all the values from Column AB, apart from the one in the first displayed row. So, if the filter displayed rows 12, 24, 45 and 67, I would need to erase the value in AB24, AB45 and AB67, leaving the value in AB12 in place.
If the filter returned ONLY one row (for example 18), the value in AB18 would need to remain in place.
I think I need to select an offset of 1 row from the first filtered value in column AB (to retain the first value), then erase the remaining values, but I can't find an easy way to select just the visible rows within the filter whilst making sure I exclude the first value.
Can anyone help, please?
As always, thanks in advance
Pete
I am filtering an Excel database on column A, within a For Each loop using a list of unique Column A items located on another worksheet.
This all works fine and results in one or more rows being displayed for each item.
Column AB always contains the same value for each filtered set and I now need (providing that the filter returns more than one row) to erase all the values from Column AB, apart from the one in the first displayed row. So, if the filter displayed rows 12, 24, 45 and 67, I would need to erase the value in AB24, AB45 and AB67, leaving the value in AB12 in place.
If the filter returned ONLY one row (for example 18), the value in AB18 would need to remain in place.
I think I need to select an offset of 1 row from the first filtered value in column AB (to retain the first value), then erase the remaining values, but I can't find an easy way to select just the visible rows within the filter whilst making sure I exclude the first value.
Can anyone help, please?
As always, thanks in advance
Pete