ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   illegal field name using advanced filters after inserting a row (https://www.excelbanter.com/excel-programming/338093-illegal-field-name-using-advanced-filters-after-inserting-row.html)

tron527

illegal field name using advanced filters after inserting a row
 
I have a macro that calls the advanced filter to find all of the unique names
in a column. I have run it several times and have had no problems. I recently
added a new name to the top of the list by inserting a new row, now everytime
I try to run the macro it says that there is a "missing or illegal field
name". I cut and pasted this inserted row at the bottom and deleted the now
empty row and the filter works just fine and will list the name at the bottom
of the unique list. I then tried to sort the cells in ascending order, the
new name, being first alphabetically, was listed first. I tried to run the
macro again and got the same problem. I would like to have the list in
alphabetical order, is there any way to work around this problem?

windsurferLA

illegal field name using advanced filters after inserting a row
 
tron527 wrote:
I have a macro that calls the advanced filter to find all of the unique names
in a column. I have run it several times and have had no problems. I recently
added a new name to the top of the list by inserting a new row, now everytime
I try to run the macro it says that there is a "missing or illegal field
name". I cut and pasted this inserted row at the bottom and deleted the now
empty row and the filter works just fine and will list the name at the bottom
of the unique list. I then tried to sort the cells in ascending order, the
new name, being first alphabetically, was listed first. I tried to run the
macro again and got the same problem. I would like to have the list in
alphabetical order, is there any way to work around this problem?

In some situations when an Excel sheet is used to hold data, Excel
assumes the top row to contain the field names. If this is the case,
and one of the values that ends up in the top violates the rules for
field names, trouble would likely be encountered.


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com