I am using advanced filter and want to filter for all values that both start and end with a 1. These are actually 6 character numbers rather than text. So I want to display 123451 but not 123456 or 223451.
I've tried various things but when I add these criteria to the other ones already in place (on the same row in the criteria range) the criteria results in a longer list than if I have just the one criteria (I don't think that this should happen!)
I am actually using VBA so my criteria range is
Range(c.Value).CurrentRegion however I have also tested manually applying advancedfilter with the same results.
I am actually applying 1 of 8 different criteria sets, processing the filtered data and then applying the next criteria set - using code. My approach is working for the 7 other sets so I think it is just my inability to work out the criteria...
Because of the somewhat dynamic nature of the source data I would really rather refer to named ranges/field names than specific cell references.
I have tried
Fieldname1 Fieldname2
fred =1????1
Fieldname1
Fred =LEFT(TEXT($AD$10,"######"),1)=1
(I know that this only meets half my requirement but....)
Fieldname1
Fred =AND(LEFT(Data!$AD$10,1)="1",RIGHT(Data!$AD$10,1)="1")
Thanks,
Gavin
I've tried various things but when I add these criteria to the other ones already in place (on the same row in the criteria range) the criteria results in a longer list than if I have just the one criteria (I don't think that this should happen!)
I am actually using VBA so my criteria range is
Range(c.Value).CurrentRegion however I have also tested manually applying advancedfilter with the same results.
I am actually applying 1 of 8 different criteria sets, processing the filtered data and then applying the next criteria set - using code. My approach is working for the 7 other sets so I think it is just my inability to work out the criteria...
Because of the somewhat dynamic nature of the source data I would really rather refer to named ranges/field names than specific cell references.
I have tried
Fieldname1 Fieldname2
fred =1????1
Fieldname1
Fred =LEFT(TEXT($AD$10,"######"),1)=1
(I know that this only meets half my requirement but....)
Fieldname1
Fred =AND(LEFT(Data!$AD$10,1)="1",RIGHT(Data!$AD$10,1)="1")
Thanks,
Gavin