Hi,
I'm trying to get Excel to run through a worksheet and copy those rows which match the criterias that has been chosen in a userform. The only thing that i can't get to work, is the month value since the ref. cell is in the "dd-mmm-yy", and my vba code can only find the row if I change the format to "mmm" which isn't acceptable (in the userform you can which month to copy).
I do have most of the code, I think its only the part in bold that needs to be changed so that it looks for a partial match.
So how do I get Excel to find eg. "Jan" in a cell with the date format that looks like eg "11-Jan-15"?
I'm trying to get Excel to run through a worksheet and copy those rows which match the criterias that has been chosen in a userform. The only thing that i can't get to work, is the month value since the ref. cell is in the "dd-mmm-yy", and my vba code can only find the row if I change the format to "mmm" which isn't acceptable (in the userform you can which month to copy).
I do have most of the code, I think its only the part in bold that needs to be changed so that it looks for a partial match.
Code:
Month = SelMonth.Value
...
If Range(ColumnMon & CStr(LSearchRow)).Value = [B]Month[/B] Then