vba coding

  • Thread starter Thread starter cporter
  • Start date Start date
C

cporter

I have a test tool that generates a 1079 row x 13 column csv file and I
would like to automate its conversion into a spreadsheet we use to
analyze it. The tool takes samples for different areas and has an id#
associated with that area in one column. Some areas require two
samples, others require ten. I would like to take the row associated
with an id# and sum the data in columns 9-13 and place the sum in a
column and row on another worksheet. If the next row of data in the csv
file has the same id# I'd like to sum the data as before and place it
in the next column over.

Something like:

=IF('import here'!$D1='data conv'!$A4,SUM('import here'!$I1:$M1))

then skip down one row in 'import here'

=IF('import here'!$D2='data conv'!$A4,SUM('import here'!$I2:$M2))


On a false condition it needs to increment the sample id# & check the
next row down in the 'import here'. Any ideas on how to do this or
where I can find a good reference?
 
Looks like a candidate for a for/each or i=loop
for i=1 to 21
if cells(i,"d")="blah" then
next i
 
Back
Top