Fill down problem

J

Jac Tremblay

Hi everyone,

I have a VBA problem with the Fill down when there is only one cell
selected. The value of the cell above is copied into the selected cell which
is not what I want of course. I tried the Fill down command on the worksheet
and it dose the same thing. What is the problem? Which option should I set to
correct that?

I am using Windows XP and Excel XP.

Thanks.
 
J

Jim Rech

If you fill down a single cell Excel usually does a copy, for instance with
a cell with a 1 in it. If you select 2 cells, with 1 and 2, Excel sees the
pattern and does a series. You can get the series behavior with one cell if
you drag the fill handle with the right mouse button and pick Series from
the pop up menu.

If you're looking for the right code to do this with VB I'd suggest
recording a macro as you fill a series.

--
Jim Rech
Excel MVP
| Hi everyone,
|
| I have a VBA problem with the Fill down when there is only one cell
| selected. The value of the cell above is copied into the selected cell
which
| is not what I want of course. I tried the Fill down command on the
worksheet
| and it dose the same thing. What is the problem? Which option should I set
to
| correct that?
|
| I am using Windows XP and Excel XP.
|
| Thanks.
| --
| Jac Tremblay
 
J

Jac Tremblay

Hi Jim,

I just want to know if there is a way to tell Excel (a check box somewhere
in the options, for example) to do nothing when I do a fill down when there
is only one cell selected (one row to be exact). The copy action that Excel
does in that case is not standard according to my knowledge of the product
and must have appeared in one of the last versions (I use 2000 and XP at the
office and 2003 at home). I have started working with the version 1 of Excel
somewhere around 1986 (on the Mac)and have never seen that happen before.

The reason why I would rather have a checkbox option to set somewhere is
that if this is not possible, I will have to modify a VBA Excel application
that was working fine until I find that problem.

My Excel application inserts data in 10 different worksheets and fills down
many formulas in specified columns. I never know how many rows will be
inserted in a particular sheet and sometimes, the destination sheet already
contains some data and sometimes, it is empty.

You probably understand that I get the problem only when I insert one row in
an empty worksheet. So It should be rather easy to check this information
before I fill down the corresponding formulas. But it would still be easier
to just click on an option button.

I keep hoping...

Thank you for your time.
 
J

Jac Tremblay

Hi Jim,

You say: "If you select 2 cells, with 1 and 2, Excel sees the pattern and
does a series."

If we are still talking about the Filldown command, from the keyboard or
through a VBA command, this statement is not correct (unless you are talking
about using the fill handle with the right mouse button). Excel simply copies
the top cell value into the bottom cell.

What I noted is that if you select 2 different cells with the Ctrl key,
Excel does not copy the value of the top cell into the selected cells. In
that case, Excel does nothing which is what is normally expected. But if you
do the same thing using the Shift key, Excel does copy the value of the cell
above into the selected cells. Is that normal? I think this isn't.

Thanks
 
Top