I am trying to create a formula (in VBA code) that will enter a formula in a spreadsheet to count the number of cell entries. The count formula will be for a random number of rows and may appear anywhere on the sheet. Eg i want to take the active cell and enter a formula to do the following = counta(start at the cell two rows above this one: and end the formula for the count end (xlup) twice and then down once) This formula will always have the same start and finish point as described in the counta formula - But the number of rows will never be constant.
I would suggest that you ask in microsoft.public.excel.programming. This group is for the use of vba in Word. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Marie" wrote in message news:8B57A28F-D863-4386-BEBC-86F33F3903DB@microsoft.com... >I am trying to create a formula (in VBA code) that will enter a formula in >a > spreadsheet to count the number of cell entries. The count formula will be > for a random number of rows and may appear anywhere on the sheet. > > Eg i want to take the active cell and enter a formula to do the following > = > counta(start at the cell two rows above this one: and end the formula for > the > count end (xlup) twice and then down once) This formula will always have > the > same start and finish point as described in the counta formula - But the > number of rows will never be constant. > > >