LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Adding the $ AFTER the data was collated?


Petitboeuf Wrote:
SamuelT,

Many thanks! It worked a treat! :)

Now for the next challenge!

My formula is something like "=Sheet1!a9/Sheet1!a9" which will give me
a % (100% in that case).
I want to copy/paste down the formula and in order to do so would need
the formula to be:
"=Sheet1!a9/Sheet1!$a$9"

What would be the tweak on the code to make this happen? I tried to
play with it but my VB abilities do not allow for any results ;)

Many thanks


try this, it worked for me:

Sub SetPartToAbsolute()
Dim c As Range
Dim arSplit As Variant
Dim Numer, Denom As String
For Each c In Selection
If c.HasFormula Then
arSplit = Split(c.Formula, "/")
c.Formula = arSplit(0) & "/" & Application.ConvertFormula(arSplit(1),
xlA1, xlA1, xlAbsolute)
End If
Next
End Sub


--
FrankB
------------------------------------------------------------------------
FrankB's Profile: http://www.excelforum.com/member.php...o&userid=18952
View this thread: http://www.excelforum.com/showthread...hreadid=562366



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pull data from another sheet based on certain criteria steve_sr2 Excel Discussion (Misc queries) 1 February 23rd 06 10:08 AM
Adding "fixed" data to variable length data [email protected] Excel Worksheet Functions 3 February 16th 06 08:59 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Automatically Adding Data to Charts lhollen1 Charts and Charting in Excel 1 June 9th 05 05:43 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM


All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"