View Single Post
  #10   Report Post  
Josh O.
 
Posts: n/a
Default

Kind of. I have a csv file that is pulled from a database. The final goal
of all of this is to create a usable report. The original CSV is not set up
to be used in a practical manner. I am trying to pull the customer number,
invoice number, invoice date, and invoice amount from the CSV file to my
spreadsheet. I just can't figure a simpler way to do it. One other problem
is that the invoice amount is in one of 7 different columns (based on the age
of the invoice). The csv file is updated every time I export it from the
system.

I just don't know the best way to accomplish that. I would appreciate any
ideas that might be simpler, because even at this point the array formula
cause a few other minor issues.

"Harlan Grove" wrote:

Josh O. wrote...
Is there a way to pull a list of numbers from another worksheet. What

I
need to do is pull all the customer numbers from a csv file and then

lookup
the remaining info from the csv file. But the customer numbers that

appear
in the csv file constanly change. Can I pull that data from the csv

file?
....

Meaning you need to pull customer numbers from different versions of
the CSV file periodically? If so, are the CSV files always in the same
layout except perhaps for the number of rows? Are you trying to pull
distinct customer numbers then all detail information for each customer
number? If so, then you'd be MUCH better off just sorting the CSV by
customer number, then adding the following formulas in the column
immediately to the right of your data (I'm assuming customer number is
in column A, and the first column to the right of your data is column
Y).

Y2:
=A2=A1

With cell Y2 active, double click on the little square box at the
bottom right corner of the border around cell Y2 (the little square box
is called the fill handle). This should fill your formula down in col Y
into all rows with data in col X. These formulas will evaluate FALSE
for all rows in which the customer number already appears.

Select the entire data range including the added column (Y in my
example) and run Data Filter AutoFilter. This should put drop-down
arrows in each cell in row 1 in each column of the selected range.
Click on the drop-down arrow In column Y (the column with the formulas)
and select FALSE from the drop-down list. This should filter only the
rows in which the customer number has already appeared in preceding
rows. With this filter active, move to A2, hold down [Ctrl] and [Shift]
keys and press the down arrow. This should select all cells in col A
that contain second and subsequent instances of each customer number.
Press [Delete] to clear the customer numbers from these cells. Then run
Data Filter AutoFilter again to clear the filter. Clear col Y.

This should have left single instances of each customer number in col A
with all detail data for that customer in the subsequent columns on and
below the row containing the customer number in col A. Save as an XLS
file.

If you're doing something more complicated than this with your data
extract, provide details. There's almost certainly a better way to do
what you need to do than using a great many VLOOKUPS calls.