Fill problems

benneesham

New Member
Joined
Mar 24, 2009
Messages
3
I have a macro that formats a sheet of postcodes for our use.
one of the functions is to filldown two seperate columns by the length of the adjacent column, with a formula that is enetered in cell 2, 1.

When I run the macro the second filldown column skips the blanks that can appear in the data and fills the formula down to the last row in its relative column, which is perfect, but this doesnt happen on the first column.
The first column it tries to filldown is affected by blanks and stops the fill.

Any reasons for this and suggestions on how to change?

Code below:

Column 1 fill
rng.Offset(0, 4).Cells(2, 1).FormulaR1C1 = "=COUNTIF(C[-2],RC[-1])"
Range(rng.Offset(0, 3).Cells(2, 1), rng.Offset(0, 3).End(xlDown)).Offset(0, 1).FillDown

Column 2 fill:
rng.Offset(0, 8).Cells(2, 1).FormulaR1C1 = "=COUNTIF(C[-2],RC[-1])"
Range(rng.Offset(0, 7).Cells(2, 1), rng.Offset(0, 7).End(xlDown)).Offset(0, 1).FillDown


Regards

Benn
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,907
Messages
6,122,181
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top