How do I sort data into 2 worksheets in excel vba?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here's the situation...

I need to take the fifth digit of a six digit strText. If the fifth digit
is even, I need to store the data row in worksheet(Controlled), Else if the
fifth digit is odd, then store the data row in worksheet(Experimental).

After sorting current records, I need to create a form for data input. I
figure it would be easier to have the data separated during initial processes.

I thought of using the inStr function, but this would only work if I first
put spaces between each digit, right. If someone knows of an easier way to
do this, please help.
 
Here's one way.............

=IF(ISODD(MID(A1,LEFT(A1,1)+4,1)),"ODD","EVEN")

This formula will determine if the 5th digit in A1 is odd or
even..........put it in a helper column and copy down (assuming your data
is in column A)..........then Copy > PasteSpecial values on that column to
replace the formulas and do Autofilter and pick the odd's or the even's and
copy that field to another sheet, then do it again for the opposite
one............turn on the Macro recorder first and you got the whole thing
in a macro to run for next time..........

hth
Vaya con Dios,
Chuck, CABGx3
 
Back
Top