Originally Posted by
InXpress
1) How do you enter an 'OR' rule? At the mo, only rows with 'R' in column F are copied, but I need to copy all rows with 'R' Or 'G' Or 'B' in column F.
Something like this (just an example, you need to adapt it for your specific need):
Or using Instr allows you to generalise the routine for handling RGB, Y or N (pass the required search string as a subroutine argument), something like this:
2) How can I copy it to a separate CSV file?
Here's a routine and example call which saves the specified sheet as a CSV file:
3) Is it possible to have more than 2 macros in a single workbook? I need one to copy 'R'/'G'/'B' rows, one to copy 'Y' rows, and a third to copy 'N' rows. At present, if I create a third macro, the first one disappears!
Yes, by putting the macros (subroutines/functions) below each other in one module or in separate modules. But, as I said, you could have one general routine which handles all 3 cases, depending on a search text parameter.
Bookmarks