I have a table I download weekly of over 200 chinese products, to sort and pick out the dozen values I actually need, I filter the table using the chinese name, then copy and paste to another spreadsheet. This was easy when there were only three but now I'm looking for a way to be able to do this automatically from a list of the chinese characters. An example: gasoline is 汽油, but to sort the table, I have to use an assigned string variable using a formula.
Dim CC as string
CC = ChrW(27773) & ChrW(27833)
ActiveSheet.Range("$A$1:$K$225").AutoFilter Field:=1, Criteria1:=CC
This works to find 汽油. Actually assigning CC directly to the cell containing the Chinese text (CC = Sheets("List").Range("A1").value or CC = Sheets("List").Range("A1").text both return CC = "??")
I would like to be able to reassign the CC variable for each item (as they change on occasion) rather than have separate variables for each item as I now have to, causing me to copy sections of code over anytime I introduce a new variable or change the values for some that I have.
The calculations to convert the Chinese characters into the ChrW(#'s) involves first splitting the Chinese name, looking up an AscW() value for each character, then combining them back into a text formula,
Cell X123's formula is ="ChrW("&B123&") & ChrW("&C123&")"
I've tried assigning CC directly,
CC = Sheets("List").Range("X123").value
However CC then = "ChrW(27773) & ChrW(27833)" (with quotes).
Any suggestions?
Dim CC as string
CC = ChrW(27773) & ChrW(27833)
ActiveSheet.Range("$A$1:$K$225").AutoFilter Field:=1, Criteria1:=CC
This works to find 汽油. Actually assigning CC directly to the cell containing the Chinese text (CC = Sheets("List").Range("A1").value or CC = Sheets("List").Range("A1").text both return CC = "??")
I would like to be able to reassign the CC variable for each item (as they change on occasion) rather than have separate variables for each item as I now have to, causing me to copy sections of code over anytime I introduce a new variable or change the values for some that I have.
The calculations to convert the Chinese characters into the ChrW(#'s) involves first splitting the Chinese name, looking up an AscW() value for each character, then combining them back into a text formula,
Cell X123's formula is ="ChrW("&B123&") & ChrW("&C123&")"
I've tried assigning CC directly,
CC = Sheets("List").Range("X123").value
However CC then = "ChrW(27773) & ChrW(27833)" (with quotes).
Any suggestions?