ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Extract and sort (https://www.excelbanter.com/excel-programming/377765-data-extract-sort.html)

joecrabtree

Data Extract and sort
 
To all,

I am having a few problems with programming a macro in excel. What I
want to do is as follows:

1) I have a series of data identified by certain codes for example:

C1965(1) = 33
D2960(2) = 66
D2960(1) = 33
D2965(1)=344
D2965(2)=878

etc.

So the first question I have is how to automatically extract the middle
part of the 'code' eg the 960 (Temperature ) part, and return to the
user all the different temperatures that are in the set of data. For
example with the above data it would return 960, and 965.

2 Secondly I want to take the average of data at certain locations for
example C1 and D2 and temperatures 965 and 960. In the case of C1 this
is easy as there is only one piece of data, but for D2 there is 2
pieces of data represented by the number in the brackets ( 1 ) and ( 2
). How do I search the data and etxract this info and take the
averages? At the moment I am using VLookup, but this isn't very
flexible as you have to be very explicit in what you are looking for.

Thanks in advance.

Joseph Crabtree



All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com