ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I join two formulas? (https://www.excelbanter.com/excel-worksheet-functions/198269-how-can-i-join-two-formulas.html)

Little Researcher

How can I join two formulas?
 
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.)

Lars-Åke Aspelin[_2_]

How can I join two formulas?
 
On Sun, 10 Aug 2008 03:00:00 -0700, Little Researcher
wrote:

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/ex...047111033.aspx


Hope this helps / Lars-Åke


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com