Problem in excel VB using macros

S

shijyshelly

I am new to this excel VB Macros.

I came across the excel sheet with macros which extracts 10 heights
from a text files stored in some subfolder in server.

For eg: Product A has ten heights in ten columns in a row
ProductB has ten heights in ten columns in second row..Likewise around
100 products are there..But sometimes all these ten heights are not
there..
For eg: Product A has only 7 heights the rest 3 columns are empty
For eg:product b has only 3 heights the rest 7 columns are empty..
So i want to take the last height available from each product row .
After that i want to calculate the Average height of all the
products,Minimum height and maximum height of all the products.All
these calculation should be based on the final height available from
column1 to column10.(not on the 10th column which is empty)

My other problem is i have a list of products.
I want to get the products according to the user input in the macros.In
this case
For eg: filepath = "\\199.182.2.123\pc_Data\Aaaa10\A44410\" &
gStep(stepid) & "\" & datepath

Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(filepath)) Then
With Application.FileSearch
..LookIn = filepath
..SearchSubFolders = True
..Filename = "*.*"

after searching for the datepath (which is a folder) it seaches
for the subfolder and all the files according to the productname user
input.

I want to narrow down my search pattern like if the user input AA all
the files starting with AA should be displayed on the
chart(eg:AA234op.txt)..If he enters BB all files starting with BB
should be displayed on the excel sheet.

Hope somebody can help me on these two problems of mine
Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top