R
RichardO
Hi All:
I have a couple of workbooks open (with a code someone helped with an
it works fine).
In my "working" worksheet, which is not included in the workbook
mentioned above, I would like to search for cell C3= Account Name e.g
Hortons and C4= Account Number e.g. 0010456 in the worksheets of th
workbook open. The worksheet name is called Raw Data. e.g. in Januar
2004 workbook, I have a worksheet called Raw Data, in February 200
workbook, I have another worksheet called Raw Data and the data i
presented in the same manner.
My question is: how do I write a maro to search cells c3 & C4 of m
working worksheet in the Raw Data worksheets mentioned earlier.
I read somewhere that autofilters are very good with vba. So I think a
easier way of searching for the values would be to autofilter the Ra
Data worksheets one at a time, and search for the value of c3 of m
working worksheet in column A of the first Raw Data worksheet and the
perform another autofilter to search in column G of the Raw Dat
worksheet for the value of c4 of my working worksheet. If excel find
rows that match, it should copy the information found in column A, G,
& K of the raw data worksheets into my working sheet starting at A20
C20 E20 and F20, so, if it finds more than 1 row of matching data, i
should find the last row after A20, and insert rows to accomodate th
data e.g. A21, C21, E21 and F21 e.t.c. If it doesn't find anything i
the Raw Data worksheet for the January 2004 workbook for example, i
should move on to the Raw Data worksheet of the February 2004 workbook
until it goes through all the Raw Data worksheets of the workbook
open, if it doesn't find anything, it should leave my workbook as is.
I would like the macro to search each worksheet one at a time because
am not sure it could search the Raw Data worksheets simultaneously.
I know if sounds really complicated, but it may be possible t
execute.
Please please hel
I have a couple of workbooks open (with a code someone helped with an
it works fine).
In my "working" worksheet, which is not included in the workbook
mentioned above, I would like to search for cell C3= Account Name e.g
Hortons and C4= Account Number e.g. 0010456 in the worksheets of th
workbook open. The worksheet name is called Raw Data. e.g. in Januar
2004 workbook, I have a worksheet called Raw Data, in February 200
workbook, I have another worksheet called Raw Data and the data i
presented in the same manner.
My question is: how do I write a maro to search cells c3 & C4 of m
working worksheet in the Raw Data worksheets mentioned earlier.
I read somewhere that autofilters are very good with vba. So I think a
easier way of searching for the values would be to autofilter the Ra
Data worksheets one at a time, and search for the value of c3 of m
working worksheet in column A of the first Raw Data worksheet and the
perform another autofilter to search in column G of the Raw Dat
worksheet for the value of c4 of my working worksheet. If excel find
rows that match, it should copy the information found in column A, G,
& K of the raw data worksheets into my working sheet starting at A20
C20 E20 and F20, so, if it finds more than 1 row of matching data, i
should find the last row after A20, and insert rows to accomodate th
data e.g. A21, C21, E21 and F21 e.t.c. If it doesn't find anything i
the Raw Data worksheet for the January 2004 workbook for example, i
should move on to the Raw Data worksheet of the February 2004 workbook
until it goes through all the Raw Data worksheets of the workbook
open, if it doesn't find anything, it should leave my workbook as is.
I would like the macro to search each worksheet one at a time because
am not sure it could search the Raw Data worksheets simultaneously.
I know if sounds really complicated, but it may be possible t
execute.
Please please hel