LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 173
Default Creating a sentence using macros

Without knowing what sort of variations you need to incorporate I don't see
how anyone could help. There must be some sort of rules governing what the
entries could look like in columns A, B, and C (and possibly others?) and
what the resulting sentence must look like for the various possibilities.
Will

"Edwin" wrote:

Thanks cm, but I would like to do this with a macros only because Ill have
many variations of the sentences depending on the input given; which means
that I will need to use more €œIF€ statements than a formula could handle.

--
Edwin


"cm" wrote:

Edwin,

This assumes that all of your values have the same format as your example,
and that there are single spaces between the 55 and 85 and between the 25 and
200.

=LEFT(A1,2)&" "&TEXT(TRUNC(B1),0)&","&TEXT((B1-TRUNC(B1))*100,0)&"
"&MID(C1,3,5)

Adjust the last '5' to however many characters after ER are possibly needed.



"Edwin" wrote:

Hi,

I have the following info in a worksheet:

A1 B1 C1
55KL 85.25 ER200

I would like to create a macro that would generate the following sentence in
cell A3:

55 85,25 200

Please note that the point in cell B1 was changed with a comma in the
sentence. I have a form with this setting repeating many times, so it would
be nice if the solution involves the active cell and the cells above it from
which the sentence is created instead of specific cell names. This is a
simplify version of what I really need to get done, but it has the basic idea
of what Im trying to achieve.

Any guidance would be greatly appreciated.

Edwin

 
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
creating macros garygc Excel Discussion (Misc queries) 1 February 5th 09 11:24 PM
creating a macros and repeating it fvs Excel Discussion (Misc queries) 1 December 2nd 08 09:21 PM
macros creating NSNR Excel Discussion (Misc queries) 2 October 26th 07 08:19 AM
creating macros in excel ryanzoo06 Excel Discussion (Misc queries) 1 May 15th 07 07:43 PM
Macros-creating new sheets Bonbon Excel Worksheet Functions 3 February 17th 06 09:44 AM


All times are GMT +1. The time now is 10:06 PM.

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"