Problem in excel VB using macros

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
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 = "\\\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

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

shijyshelly's Profile:
View this thread:

9/29/2004 8:56:03 AM
excel.newusers 15348 articles. 2 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 36


Similar Artilces:

encoding problem in Outlook 2007 importing Outlook 2000 personal folders
I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese characters in the subject became unreadable but it's ok to display in message body. In Outlook 2000, there's no problem to display the Chinese characters in the subject. What's wrong with Outlook 2007? What setttings should I change to fix the problem? Thanks. cyl <> wrote: > I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese > characters in the subject became unreadable but it's ok to display in > message body. In Outlook 2000, there's no problem t...

List of DDE commands for Excel
Hi, I wont to send some commands from my application to Excel via DDE. Fo example : to select specific sheet in the excel workbook I use nex command - [WORKBOOK.SELECT("sheet-name")]. But I can't find the list of all these commands. Please help me -- Message posted from If you have a look in the object browser in the excel visual basi editor it will have a list of the VB commands excel will accept and i you hit F1 on them it will tell you what they do and usually giv syntax. Dunca -- Message posted from 2 DNF Karran Th...

How to use CPicturHolder class? #2
Hello, I am fresher for the VC++. I Want to display .jpg, .bmp etc. images in my Dialog box picture controle. I have created one object of of CPictureHolder class as dialog class member. But using that I am not able to show the picture in Picture contrl Plz show simple some code for better understanding...... plz tell me. Klic Klic wrote: > Hello, > > I am fresher for the VC++. I Want to display .jpg, .bmp > etc. images in my Dialog box picture controle. I have created one > object of of CPictureHolder class as dialog class member. > But usin...

Problem shortcuts in Word
Hello, I work with Word 2008. In the beginning there is no problem, but suddenly i have problem with shortcuts. When i want to do "cmd c" it make an other shortcuts same thing for "cmd s", "cmd v" and surly some other. But when i write there is no problem "c" is "c"... If somebody have an idea please help me. Thank you. Unless you indicate your specific update level of Office as well as OS X & describe what the keystrokes *are* doing contrary to what you expect there isn't much we can offer. -- Regards |:>)...

Outlook 2003 PST problems
I just installed Office 2003 professional on a new computer & am having problems with outlook. I copied my Outlook.pst file into the appropriate directory & although it is recognized the calendar is not working properly. I cannot attach any of the colored labels to my appointments - so everything is pretty much in black & white. I totally uninstalled & reinstalled office... first removing my pst file... but there appears to be an ini file... or something that is retaining some information... does anyone know of a fix for the labels... or how to TOTALLY uninstall office (so I...

Excel copy and paste #2
Excel 2000 1) there are times when I can only paste values and not formulas from one workbook to another even though I am using Edit/Copy and Edit/Paste process. 2) there are times when I cannot copy and paste between workbooks launched from Edit/Copy, Edit/paste, or CTRL C, CTRL V or from shortcut menu. The only way is to use the clipboard which does not copy formulas. we have referred to 209338 and 209284 but the stated solution doesn't always work. ...

Problem with Authentication
The CRM application was running smooth. But now I can't logging. It ask my credentials and than return a 401.1 error. I had already reinstalled the CRM server but it won't work. I'm accessing it in the same local network. I'm running CRM 3.0 in SBS. Best regards, Erico Hi When you open a Internet explorer and type the name of the CRM server, it prompts for user and password ? Are you logged in with domain credentials ( AD user ) ? If you are, so add url of the crm server in Local intranet. Enable "Automatic logon only in intranet", this is under security,c...

Vista blue screen problem...please help!
I've seen some other threads, here are the dump files: 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' ( Please, help me out here. -- ceVil It might be better to know at what point the bsod occurs and what the actual err.msg given is "ceVil" <> wrote in message > > I've seen some other threads, here are the dump files: > 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' > (...

calendar problem
Dear all, I am using both mail and calendar function in outlook 2002. Everything is ok until recently, when I try to make a new appointment or checking any old appointments, an error message "out of memory or resource, try to close some windows..." pop up. The mail function is still ok. Can anyone tell me how can I solve this? I have already installed sp2. The version of office is the professional one with frontpage. Thanks. tp ...

How do I assign X = the value of 1 in a cell in Excell 2003?
How do I assign X = the value of 1 in a cell in Excell 2003? That need some explaining. Excel genially goes use variables but rather uses cell references. Cells can be given names (such as x) but it is not required. Tell use more about what you wish to accomplish best wishes -- Bernard Liengme remove CAPS in e-mail address "Givens" <> wrote in message > How do I assign X = the value of 1 in a cell in Excell 2003? Put a 1 into any cell - let'...

format of emailed excel file
In excel 2003 when I email a a particulat worksheet in a workbook I lose all the formating when it is recieved in Outlook 2003. Is there anyway to preserve the excel "look"? Thnaks, Craig S ...

problem #4
Hi, I am facing this new problem... i.e a user has installed Office 2003 on win2k prof platform.. whenever she is working on a outlook.. she gets a Microsoft error message... saying to send the report or don't send the report... Usually I have seen this problem in IE... But for outlook it is new to me... after clicking on send or don't send report.. the outlook closes. And there are no IE open..... and if atall it is open.. the IE does not close... Need your help regards, KAH What is logged to the Event Viewer regarding this? Try one of the following already; http://www.howt...

95 and 97 problem
For some unknown reason there is Excel 95 and 97 on this pc.When i double click on an Excel file, the pc defaults to the 95 program (Which incidently doesn't work properly). So my question is how do i get the pc to default to 97. Cheers Craig Craig, Have a look at Windows Help. From Windows 2000 Help (Index under Programs Associating with File Types) To change which program starts when you open a file In My Computer or Windows Explorer, on the View menu, click Folder Options. Click the File Types tab. In the list of file types, click the one you want to change. Click Edit. In Act...

Need to change Autofilters behaviour in Excel 2003
Hello, Does anybody knows how to change the color of the triangle arrow on the column titles of autofilter ranges? Presently, when a filter is put on one column, the arrow for this column is changed from black to very dark blue. I need to change this color, so that this becomes more visible. At our office, my boss cannot make any difference between these two colors. This is a problem for daily work. Thanks in advance for any help. Bertrand from Tokyo, Japan see response to your earlier posting -- Regards Roger Govier Bertrand wrote: > Hello, > > Does any...

AS400 transfer into Excel 07
When I run the "transfer from AS400" I get to the final process where its pulling the data into excel, excel crashes with a fatal error. Any help.... This is the same issue I am having. see KB933666. I installed Office 2003 service Pack 3 on all my office machines and the new service pack features security fixes that block all *.wk4 files. This is the same patch that has been applied to Office 2007. This is the format, I think your are exporting out of the AS400. If it is, I would uninstall office 2007, make sure the folder is deleted then reinstall Office 2007 after a reb...

sync problems
I have all of my info on an HP Ipac. I had to reformat the hard drive and I did not make a back-up file. I am trying to move everything back to the computer but it says there is an error with syncing it. How can I move everything from the PDA back to Outlook again? Please help- thanks ...

how to read XML with entities using C#
Hi there, I have two xml files, one is a master file and the other is just a fragment of xml. Master xml file uses 'DOCTYPE' to define the other file as an entity. Then, the master uses entity references that are supposed to be expanded into real content at parsing time. Examples are provided below. When I open master xml file in InternetExplorer , IE shows correct content. All the entities are transformed into right xml. So far I have been unsuccessfull in getting similar result when I try to do the same programmatically using C#. I was trying to use XmlDocument and XmlVal...

Date problem
I can't believe there's no post on this, but I can't find it. I've tried the solutions I could find (see below) and still get the error: "The expression is typed incorrectly or it is too complex to be evaluated. For example....Try simplifying...." I have a date field, formatted as Date/Time, General Date, default Value = Now(). I like having the date and the time - in case we need it. I want to run a report on calls taken just for one day. I have CallDate: CallDateAndTime in my query, with "criteria" as Between ([Forms]![frmReports]![txtStartDate]) A...

Office 2007 - HELP
I have used Word for many years and love it - not too thrilled with the changes in Office 2007, but my bigger issue is with Publisher 2007. I have an image that I have used in Word just fine - meaning, the on screen colors are correct and when printed the colors are correct. Someone sent me a Publisher file and asked me to add the image - I did this - now the image is messed up - the colors are correct on screen, but when printed FROM MY computer the image colors are all wrong - but if I transport the file to a different computer it prints fine I have reinstalled Office - no good Any id...

Installation Problem!!
I am having a problem installing MSCRM 1.2. My configuration consists of a Domain Controller running Win 2000 Server SP4 . I am trying to install MSCRM on a member of the domain running Windows 2000 Server SP4. There is a DNS Server on the DC which is integrated with AD, and a SQL Server 2000 running on the Win 2K machine. The install errors out when CRM creates the root business with the message: Setup was unable to install Microsoft CRM Server. Setup was unable to provision your organization. Setup was unable to create the root business. The configuration of ASP.NET seems to be ok, the pr...

Resource editor problems
Hello all, Under VC++ 7.1... Please consider these two lines: IDC_ARROW_ADD_CANCEL DISCARDABLE "res\\cur00004.cur" IDC_ARROW_ADD_CANCEL CURSOR DISCARDABLE "res\\cur00004.cur" The second is a hand-edited change to the first. Both will compile just fine in the resource compiler. However, after I use a text editor to make this change, I cannot open the .rc file in the resource editor. The resource editor issues the following error open attempting to open the .rc file: error RC2135 : file not found: CURSOR Can anyone shed light on what's going on here? Thanks, Dave ...

Problems Creating a disclaimer in Exchange 2003
I am trying to create a server based disclaimer that will stamp all of my smtp emails going to the internet. I have been following KB article 317680 with no luck. I get an error like the one below. Binding Display Name Specified: smtpscriptinghost ** Registration Failed ** Err.Number (HRESULT) = 0x1AD Err.Description = ActiveX component can't create object ProgID = cdo.ss_smtponarrival COM Category = {FF3CAA23-00B9-11d2-9DFB-00C04FA322BA} Corresponding Event = onarrival ** Have you registered your sink COM class on this machine? I am puttin...

Directory Replication Problem #2
Hi, recently my Exchange Server directory database receives changes from other servers but does not send out its own changes. Check from the knowledge base, to correct the USN discrepancy need to use Authrest.exe (need to amke changes for about 100+ users). Does anybody know where to get this file 'Authrest.exe' for exchange server 5.5? Exchange server 5.5 CD only provide this file for ver.4.0. Have anyone use it before? Regards, "Sharon Tan" <> wrote: >Hi, recently my Exchange Server directory database >receives changes from ot...

Hi! I have an Excel sheet were I have a few formulas. When the sheet is empty of numbers the formula return the value #DIV/O! I would like to know how I can hide this text - it does not look neat. I want the formula to be there; but to show as empty. I have tried to use conditional formatting which does hide the formula - but it then also hides the result when I actually put numbers into the sheet. Kathrine, Norway Kathrine, Did you use a formula in CF, such as =ISERROR(A1) You could also change your formula to =IF(ISERROR(the_formula),"", the_formula) -- HTH RP (re...

Using Checkboxes to add data to a table.
I have been having trouble developing this form for a couple of days. It seems the solution should be simple but so am I. I have an input form with four text boxes. I need to use the same data and create a new line in the table for up to but not always 9 different company positions. I was given a possible way of keeping the info on the form for the next position using the AfterUpdate event and setting the default back to the same box. But in using his suggestion I get #NAME? for the boxes with text when I select the next new record. The boxes with numbers come back the way he said it wo...