Find, Loop, Subtotal

  • Thread starter Thread starter Adresmith
  • Start date Start date
A

Adresmith

I have to use VBA. The only problem with doing it the way you suggeste
is that the cell it is looking for contains both numbers and text so
can't use >= to capture cells. Also, I wont know an acutal locating o
where the sum formula will be placed because it is going to find
specific entry, insert a row, then place the sum formulas for eac
column in the appropriate place. Any more advice?

Thanks so much,
Adriann
 
I have to use VBA. The only problem with doing it the way you suggested
is that the cell it is looking for contains both numbers and text so I
can't use >= to capture cells.

NOW you say the data in the cells down't look like what you showed in your
example. Grrrrr.... It always helps to post your REAL data, so the appropriate
solution can be given. Doing otherwise wastes time on both ends.

SUMIF can use wildcards when searching for text entries, i.e.

=SUMIF($A$1:$A$100,"*5200*",$C$1:$C$100)
Also, I wont know an acutal locating of
where the sum formula will be placed because it is going to find a
specific entry, insert a row, then place the sum formulas for each
column in the appropriate place.

Then that's another task your macro has to do: define the upper and lower rows
to be SUMMED for each column, and generate the appropriate formula using those
row numbers. That will be a lot faster than identifying the rows, then using
For/Next loop to test each cell, i.e. the "brute force" method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top