Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2011, 03:39 PM
francis francis is offline Convert numbers to a specific text string Windows 7 32bit Convert numbers to a specific text string Office 2010 32bit
Novice
Convert numbers to a specific text string
 
Join Date: Sep 2011
Posts: 1
francis is on a distinguished road
Default Convert numbers to a specific text string

Hello,



I have a number that I need to convert to the following text string formats. I have successfully converted 45 to the following text string using the custom format:
Wait(45000);

But it does not work with the ones below:

Convert 0.05 to the following text string:
<ParameterString>0.05</ParameterString>

Convert 0 to the following text string:
<Time>0</Time>

These are codes for a instrument and the text must be in the exact format above. Can anyone help.

Regards,

Frank
Reply With Quote
  #2  
Old 10-06-2011, 01:43 PM
pkrishna pkrishna is offline Convert numbers to a specific text string Windows Vista Convert numbers to a specific text string Office 2007
Novice
 
Join Date: Jul 2011
Posts: 16
pkrishna is on a distinguished road
Default

It would be better if you gave a few numbers to specify the types of numbers you want convert into text strings this way.

I tried both the numbers, 0 and 0.05. Assume they are in cells A2 and A3
Assume strings "ParaString" and "Time" in cells B2 and B3

The formula - ="0"&TEXT(A2,"##.##") - seems to convert the number in A2 to the text string 0.05, and the number in A3 to the text string 0. Assume these are in cells C2 and C3

Then the formula - ="<"&B2&">"&C2&"</"&B2&">" - (and B3/C3 in the same manner) is able to convert them to - <ParaString>0.05</ParaString>, <Time>0</Time> - in cells D2 and D3

This seems to be specific for these two numbers. That is the reason some more numbers would have been useful.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract only numbers from a STRING? Learner7 Excel 3 07-02-2013 06:25 AM
Convert numbers to a specific text string Extract Numbers from Alphanumeric String OTPM Excel 6 05-13-2011 12:52 AM
Extract numbers from a text string aleale97 Excel 4 02-10-2011 10:33 AM
Numbers Convert in word in MS Access towhid Office 0 08-19-2010 01:17 AM
Convert numbers to a specific text string Macro or Function to know wether a string is included in a text Eduardo Word VBA 5 06-15-2009 01:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft