View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo
 
Posts: n/a
Default finding blank cell and moving specific data into it

Bejay, if you use a Pivot table?

regards from Brazil
Marcelo

"BeJay" escreveu:

I am sure there is a much easier way than this but this is what I have
so far.

0 B1111
1 B1111 025005 1 15
1 B1111 025011 1 18.05 33.05
0 B2222
1 B2222 027105 1 49.68 49.68
0 B3333
1 B3333 027301 1 3.24
1 B3333 027303 1 20.02
1 B3333 029101 1 50.39 73.65
0 B4444
1 B4444 029103 1 109.36
1 B4444 029105 1 42.14
1 B4444 029107 1 101.1
1 B4444 029109 1 12.19 264.79

0 lines are order headers and 1 lines are items. I have a subtotal
formula in COLUMN F

=IF(B4=B5,"",SUMIF(B:B,B4,E:E)) calculating the total for each order
no in COLUMN B.

I need to put that subtotal into the header row (denoted by 0 code)
into COLUMN D. The data is dynamic, the numbers of order items
changing each time.

Because the data is different in COLUMN D for the Header rows (0) and
the item rows (1), I do not know how to do the VBA to tell it to
firstly find the 0 lines then to get the subtotal for the same order
number from COLUMN F at the end of the order.

I am thinking my subtotal formula needs trashing and another procedure
to create a range, then subtotal it into the first blank cell it can
find in COLUMN D..... but I don't have the skills to do it.
Pleeeeeeeease .... Any one help????? Thank you in anticipation!

Cheers, Bev J