How can I join two formulas?

L

Little Researcher

Hi,
There are many different formulas in one of my columns (C). I want to add
"+F" to all of the formulas. For example:
...
"+F12" to be placed at the end of the formula of C12
"+F13" to be placed at the end of the formula of C13
...
Any suggestion how to do it? (I hope my question is clear.)
 
L

Lars-Åke Aspelin

Hi,
There are many different formulas in one of my columns (C). I want to add
"+F" to all of the formulas. For example:
...
"+F12" to be placed at the end of the formula of C12
"+F13" to be placed at the end of the formula of C13
...
Any suggestion how to do it? (I hope my question is clear.)


Try this macro to change the first 1000 rows in column C

Sub change_formula()
Dim c As Range
For Each c In Range("C1:C1000")
If c.HasFormula Then
c.Formula = c.Formula & "+F" & c.Row
End If
Next c
End Sub

If you are not familiar on how to create a macro you can find some
instructionunder "Create a macro using Microsoft Visual Basic" here
http://office.microsoft.com/en-us/excel/HP052047111033.aspx


Hope this helps / Lars-Åke
 

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