Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Excel Formula to Macro
I hope this makes sense. I am trying to reduce some manual intervention when creating an XM file from Excel. Unfortunately I cannot just save the file in XM format because many of the values are child values. Current I copy a formula to a range of cells in a particular column say column L, starting at row 5 and going to row n. The formula look at values in other columns in the matching row concatenates the together along with some hardcoded XML tags to create an XML string. Example Data Cell R5 = "Base Price" Cell S5 = "" (Empty String) Cell T5 = "22.50" Cell U5 = "Online Price" Cell V5 = "" (Empty String) Cell W5 = "23.50" I copy a formula to Cell L5 and the resulting value for L5 is: <itemPriceLine <itemPriceTypeRef <nameBase Price</name </itemPriceTypeRef <itemPrice22.50</itemPrice </itemPriceLine <itemPriceLine <itemPriceTypeRef <nameOnline Price</name </itemPriceTypeRef <itemPrice23.50</itemPrice </itemPriceLine Any help wold be appreciate -- mjm91 ----------------------------------------------------------------------- mjm917's Profile: http://www.excelforum.com/member.php...fo&userid=1471 View this thread: http://www.excelforum.com/showthread.php?threadid=26335 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Excel Formula to Macro
What tasks are you trying to eliminate and how would describe to someone
unfamiliar with your process how to do them? Do you want to automate the copying? What is the value of n? How is it determined? How do you decide what column and row to copy the initial formula into? "mjm917" wrote in message ... I hope this makes sense. I am trying to reduce some manual intervention when creating an XML file from Excel. Unfortunately I cannot just save the file in XML format because many of the values are child values. Current I copy a formula to a range of cells in a particular column, say column L, starting at row 5 and going to row n. The formula looks at values in other columns in the matching row concatenates them together along with some hardcoded XML tags to create an XML string. Example Data Cell R5 = "Base Price" Cell S5 = "" (Empty String) Cell T5 = "22.50" Cell U5 = "Online Price" Cell V5 = "" (Empty String) Cell W5 = "23.50" I copy a formula to Cell L5 and the resulting value for L5 is: <itemPriceLine <itemPriceTypeRef <nameBase Price</name </itemPriceTypeRef <itemPrice22.50</itemPrice </itemPriceLine <itemPriceLine <itemPriceTypeRef <nameOnline Price</name </itemPriceTypeRef <itemPrice23.50</itemPrice </itemPriceLine Any help wold be appreciated -- mjm917 ------------------------------------------------------------------------ mjm917's Profile: http://www.excelforum.com/member.php...o&userid=14711 View this thread: http://www.excelforum.com/showthread...hreadid=263354 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro for converting excel to adobe pdf | Excel Discussion (Misc queries) | |||
Converting a Access routine into an Excel macro? | Excel Discussion (Misc queries) | |||
Converting two column compare macro to vba in Excel | Excel Programming | |||
Assist in converting Lotus Macro to Excel? | Excel Programming | |||
macro for converting text file to excel | Excel Programming |