Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating macros | Excel Discussion (Misc queries) | |||
creating a macros and repeating it | Excel Discussion (Misc queries) | |||
macros creating | Excel Discussion (Misc queries) | |||
creating macros in excel | Excel Discussion (Misc queries) | |||
Macros-creating new sheets | Excel Worksheet Functions |