Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Fri, 7 Dec 2012 16:28:59 +0000, Randomerz wrote:
The one constant throughout is that the "$" sign precedes every price. Perhaps the following will do what you require. It multiplies every value that both looks like a number and is also preceded by a "$", by mult, and replaces it in the original string. ===================================== Option Explicit Function MultDollars(s As String, mult As Double) As String Dim re As Object, mc As Object Dim i As Long Set re = CreateObject("vbscript.regexp") With re .Global = True .Pattern = "\$(\d+(?:\.\d+)?)" End With If re.test(s) = True Then Set mc = re.Execute(s) For i = mc.Count - 1 To 0 Step -1 s = Left(s, mc(i).firstindex + 1) & _ Format(mc(i) * mult, "#0.00") & _ Mid(s, mc(i).firstindex + 1 + mc(i).Length) Next i MultDollars = s End If End Function ============================= |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This is not working.
for eg: Cell A1: 67x89x6inch I want each and every number must be multiplied by 2.54 (to convert in cm) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This is not working.
for eg: Cell A1: 67x89x6inch I want each and every number must be multiplied by 2.54 (to convert in cm) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This is not working.
for eg: Cell A1: 67x89x6inch I want each and every number must be multiplied by 2.54 (to convert in cm) |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Am Sun, 15 Nov 2015 07:53:36 -0800 (PST) schrieb : for eg: Cell A1: 67x89x6inch I want each and every number must be multiplied by 2.54 (to convert in cm) please look he https://onedrive.live.com/redir?resi...=folder%2cxlsm for "InchToCm" There is an UDF to convert inches to cm. Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
random alphanumeric string | Excel Worksheet Functions | |||
Extracting 7 digit number from alphanumeric string | Excel Discussion (Misc queries) | |||
Comparison of alphanumeric string | Excel Discussion (Misc queries) | |||
Multiplying to string arrays | Excel Discussion (Misc queries) | |||
How do I replace last numeric string from a alphanumeric string? | Excel Discussion (Misc queries) |