Applying Formulas to a Range in a Worksheet

R

Ra

Please can you help with the following problem:

I would like to apply formulas in say Row 5, to the following cells:

F5, H5, J5, K5, O5, P5, T5, U5, Y5, Z5.

These formulas are the copied from Row 5 to Row 10,000.

The problem is, if I make a mistake in inputting data and I then need to
clear the contents of a cell or an entire row, the formulas are lost in that
row. How can I ensure that the formulas are not lost and still able to input
data in the cleared cells.

Mnay thanks,
 
G

Gary''s Student

Try this small macro:

Sub cForm()
For Each i In Array(6, 8, 10, 11, 15, 16, 20, 21, 25, 16)
Cells(5, i).Copy Range(Cells(6, i), Cells(10000, i))
Next
End Sub
 
G

Gord Dibben

You should not be inputting data into cells that have formulas so I don't
understand why you get a loss of formulas if you clear contents on an input
cell.

Formulas are for collecting from input cells.


Gord Dibben MS Excel MVP
 
S

Shane Devenshire

Hi,

This question is not clear to me. If you have cells with formulas and then
you type on the formulas you will loose the formulas, if you then clear the
content of the cells the formulas will not reappear. Is that what you really
want to have happen?
 

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

Top