Hi,
I have some output that is being presented to us in excel (relates to order details - each order in a new cell).
In each cell, i have a string of information that includes things like the following:
<ItemNumber>1</ItemNumber> <Quantity>1</Quantity> <NetWeight>1.412</NetWeight> <GrossWeight>1.412</GrossWeight> <ItemNumber>2</ItemNumber> <Quantity>1</Quantity> <UnitPrice>0</UnitPrice> <NetWeight>1.41</NetWeight> <GrossWeight>1.41</GrossWeight> <ItemNumber>3</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.002</NetWeight> <GrossWeight>0.002</GrossWeight> <ItemNumber>4</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.06</NetWeight> <GrossWeight>0.06</GrossWeight> <ItemNumber>5</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.268</NetWeight> <GrossWeight>0.268
I need a way to be able to search through the text in each cell and sum up all of the numbers shown in the Gross Weight sections. The number of items whose gross weights need to be summed up will be different in each cell. The numbers that need to be summed will always have <GrossWeight> before and </GrossWeight> after.
I can't figure a way to use the usual text functions, so assume some VBA would be the best way to deal with this (way beyond my knowledge i'm afriad!)
Any help would be much appreciated.
thanks.
I have some output that is being presented to us in excel (relates to order details - each order in a new cell).
In each cell, i have a string of information that includes things like the following:
<ItemNumber>1</ItemNumber> <Quantity>1</Quantity> <NetWeight>1.412</NetWeight> <GrossWeight>1.412</GrossWeight> <ItemNumber>2</ItemNumber> <Quantity>1</Quantity> <UnitPrice>0</UnitPrice> <NetWeight>1.41</NetWeight> <GrossWeight>1.41</GrossWeight> <ItemNumber>3</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.002</NetWeight> <GrossWeight>0.002</GrossWeight> <ItemNumber>4</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.06</NetWeight> <GrossWeight>0.06</GrossWeight> <ItemNumber>5</ItemNumber> <Quantity>1</Quantity> <NetWeight>0.268</NetWeight> <GrossWeight>0.268
I need a way to be able to search through the text in each cell and sum up all of the numbers shown in the Gross Weight sections. The number of items whose gross weights need to be summed up will be different in each cell. The numbers that need to be summed will always have <GrossWeight> before and </GrossWeight> after.
I can't figure a way to use the usual text functions, so assume some VBA would be the best way to deal with this (way beyond my knowledge i'm afriad!)
Any help would be much appreciated.
thanks.