Urgent-Urgent VBA LOOP


I need help to determine with thr VBA procedure below, I can to a loop to 
evaluate each row in column C. 
VBA Procedure

If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("C2")
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("F99")
End If
If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("C2")
Set CellToCheckForSP = VBPAWkbk.Worksheets("sheet1").Range("F99")
End If
If VBPAWkbk.Worksheets("sheet1").Range("C2").Value = "SP" Then
Set CellWithValueToMatch = VBPAWkbk.Worksheets("sheet1").Range("A2")
Set CellWithValueToMatch = VBPAWkbk.Worksheets("sheet1").Range("F2")
End If
With HeaderWks11
If (.Range("D4").Value) = CellWithValueToMatch Then
res = Application.VLookup(.Range("D4").Value, Lookup_Table_VBPA, 
col_index_num, 0)
End If
HeaderWks11.Range("F3").Value = res
End With

Jeff1 (635)
10/6/2005 4:46:04 PM
excel.misc 78881 articles. 5 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 4


Similar Artilces:

Find and Replace using a Loop won't stop
I am trying to replace cells on certain rows with the value in cell I1 within column I based on a found row from a cell in column C. I have the following macro: ActiveCell.FormulaR1C1 = "='Master'!R3C9" Selection.Copy TotalRowsToDo = ActiveCell.CurrentRegion.Rows.Count Counter = 1 Do Until Counter = TotalRowsToDo Cells.Find(What:="FB01", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchForm...

Urgent Urgent Urgent Urgent
I am posting this query in continuation to the query posted by Anna (we are colleagues). Our software license is as follows: RMS – Headquarter : a. HQs 5 Store Base Pack RMS Stores Operations : a. 5 Single Store b. 1-3 stations Could you please explain what this 1-3 stations license means? We have a merchandise shop where it is difficult to manage with one POS during the Formula One Race days. We need to have two POS in this shop but the inventory cannot be split into two as this will create a lot of confusion. Is it possible to connect the two POS to a single database so that ...

urgent: snap to connectionpoint does not work anymore
Hi, I'm using visio 2000 to draw an UML diagram. After adding several shapes suddenly when trying to add a dependency, binary association, or anything between two classes, the connector does not snap to the connectionpoints of the shapes to connect. I can not add an interface shape to a class neither. When opening another UML diagram (in a different file) it works fine. Thanks for the response. Serge Desmedt. ...

Hi everyone, I have to subtract a custom duration field from the start field to get an important information from my project. When I try do to that like: "[Start]-[Duration4]" the result is a totally confused date. How do I get this date? Best regards, Marco Ferreira Hello Marco, Try the expression ProjDateSub([Start],[Duration4]). Best Regards, Ismet Kocaman MCTS, PMP "Marco" wrote: > Hi everyone, > > I have to subtract a custom duration field from the start field to get > an important information from my project. > When I ...

need urgent help!!!!!!!!!!!!!!!!!
hi i wanted to be able to add or upload images from the form? i have a field called image which is a data type OLE Object, i right click on the field click on the insert object option on the menu an a bitmap image is linked having browsed for it and clicked on the link check box. i want to be able to add images from the form not go to the datasheet view? can you help me please!!!!!!!! also i wanted to have a button assigned to a text box in the form in which you input the image path( where the image is located) and a click of a button the image is displayed in the datatype OLE object f...

URGENT: How to pass callback func as parameter?
Hi, I have some generic (non MFC) class. CSomeClass { SayHello() { return "Hello"; } } I however wish to be able to OVERRIDE this function with a custom function in some other class like CMyMFCApp. This CMyMFCApp class is NOT subclassed from CSomeClass, so overriding that function can not be done the same way as overriding base class functions (simply redeclaring). I am assuming I must set a call back function: CMyMFCApp::Init() { CSomeClass sc; sc.SetCallback(CMyMFCApp::MyCallback); sc.SayHello(); } CMyMFCApp::MyCallBack { return "Wazzup?"; } Now, I unders...

URGENT!!! Problem with row data being truncated in a copy worksheet sub #2
Dave, Thanks for responding. I tried this but I could not get it t work in conjunction with the entire module. It dies right afte copying and PasteSpecial Values It does not kill the temp file or loa the newly created sheet into an e-mail. Any Ideas -- Doctor ----------------------------------------------------------------------- DoctorV's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=514 View this thread: http://www.excelforum.com/showthread.php?threadid=26863 You may want to post your current procedure. DoctorV wrote: > > Dave, Thanks for respon...

Read Receipt Storage Location?
Hello, I have office XP Microsoft Outlook via Exchange Server. I was working offline in the offline personal folder and I clicked on a message and it asked "sending has asked for read receipt" I clicked Yes. However since I was working offline, obviously read receipt is not yet sent. however as soon as I go online it will go out ? I went to out box to see if the read receipt is stored there, but this is not the case?? I cannot find. Can someone please confirm me the location where the read receipt are stored temporarly until these goes out, next time someone goes online...

Outlook Auto Rule (URGENT)
I want setup rule in mailboxx. - When sending message , all the message will forward to another mailbox - After permently delete it this message. - This message only send to special mailbox. I am not sure setup in exchange sever or outlook itself. It need make sure all rule run on server without user open outlook. Thanks J you would be best to go to the Exchange Newsgroups as you have said you need a server side rule. -- Judy Gleeson Microsoft Most Valuable Professional Outlook www.acorntraining.com.au <111@it.com> wrote in message news:uDDkJA5uGHA.2148@TK2MSFTNGP02.phx.gbl.....

This is a multi-part message in MIME format. ------=_NextPart_000_0030_01C38F1B.32073D10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi all, will anybody tell me=20 why are macro's preferred for Message Map entries than the virtual = functions? awaiting response, Ravi. ------=_NextPart_000_0030_01C38F1B.32073D10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META h...

Calling Crystal Ball Predictor from VBA
Based on the following description: "The Crystal Ball and CB Predictor Developer Kits allow users to completely automate and control Crystal Ball simulations and CB Predictor forecasts from within a VBA program or any other language outside of Excel supporting OLE 2 automation. The kits consist of libraries of macro commands and functions that unlock the programmability of Crystal Ball and CB Predictor. With the kits, users can automatically run multiple simulations to test different sets of assumptions, integrate Crystal Ball with other software tools, create turn...

compact/repair/backup with VBA
I want to compact/repair/backup the backend database from the frontend database using VBA code. I'm using Access 2003 and the application will be used with the runtime. I see several options for RunCommand, but they aren't explained. Can anyone give me some sample code? Should the compact/repair/backup be done in a certain order? Jennifer Hi You could do this from an OnClick - something like strDBtoBackUp = "Path to DB" DBEngine.CompactDatabase strDBtoBackUp eg (air code - not checked - no time at the moment but this is about right ??) Private Sub ButtonName_Click(...

Problem saving PDF within VBA
I am trying to save a slide in pdf format using Powerpoint 2007. I am finding that it works on some machines but not others. The specifics are Powerpoint 2007, Adobe Reader 9.2. Here is the code: Set oTempPres = Presentations.Open("c:\Cert.pptx", WithWindow:=False) With oTempPres For x = .Slides.Count To 1 Step -1 If .Slides(x).SlideIndex <> currentSlide Then .Slides(x).Delete End If Next .SaveCopyAs "c:\Cert.pptx" .SaveAs FileName:="c:\Cert.pdf", fileformat:=ppSaveAs...

Data Migration Upload Error
Data Migration Upload Error - Relationships :( Hi, I have a data migration issue which has been causing me a lot of grief over the last few days ... struggling to get to the cause : ( Some background (... a very simplified equivalent): I have 3 entities STUDENT (Contact entity renamed), TUTOR and COURSE; - Each student should only be able to be linked to ONE Tutor record - Each Tutor should only be able to be linked to ONE Student record ------+ To resolve this I have created two "1 to many relationships" and hidden the 'many' part in the relationship definition ...

Urgent Help Needed
Hi Every now and then (but becoming more and more) when I send an email, everything looks fine but as soon as gets into sent items or the recipient receives it they see it as loads of questions marks and the odd 4 or 5 and I can see it in my sent items as this......as below: I cannot type after this on this messages because the text is then back to front???? I have done an example in normal letters after the symbols which says Hello, my name is Kelly. &#8294;&#26743;&#25449;&#8296;&#29281;&#8293;&#30305;&#26977;&#24940;&#27746;&#8293;&#28271;&...

Hi again, sorry ive posted twice today for VBA help. im very new to VBA so im seeking help where i can. I have a spreadhseet with the following columns: Code - A1 Name - Uppercase - B1 Name - Lowercase - C1 Title - D1 Status - E1 Now i need to create a simple loop that checks column E (status) for a status of "CONS". If the cell contains the word CONS then it will ignore that row and move onto the next row.If it doesnt contain the word "CONS" then it will copy cell C1 into B1 and uppercase THEN let me paste a code into cell A1. Once this row is complete, it wil...

how do i comment 1000 lines of code at once in vba for excel?
how do i comment 1000 lines of code at once in vba for excel? Hi Daniel, With the code to be commented selected, click the 'comment block' button on the VBA Edit toolbar. If you do not have the Edit toolbar visible, View | Toolbars | Check the Edit toobar. --- Regards, Norman "Daniel" <softwareengineer98037@yahoo.com> wrote in message news:OgSkcsogFHA.3656@TK2MSFTNGP09.phx.gbl... > how do i comment 1000 lines of code at once in vba for excel? > > ...

Outlook Hangs when opening Excel attachment after VBA command opens new excel
Has anyone encountered this problem. We have a VBA command: Set xlApp = New Excel.Application. T This command is in an application that will stay up and running. The command above creates a new Excell application, no problem there. The program will then go about the task of creating a nice report. Once the report is created however Excel is still running as a process as seen in the Task Manager. Now if a user goes to Outlook to read email and attempts to open an attachment that is itself an Excel spreadsheet Outlook will hang and not open the attachment. The only way to have Outlook ...

win2k sp4 with Exchange2003(urgent)
I have install win2k with sp4 (install smtp, nntp of IIS) but in service I could see mta stacks, routing engine, system attendant Should I run forest prep and domain prep before install exchange 2003 in win2ksp4? Which steps should I forget to do ? Thx all Mike What are you not seeing? You can't install Exchange Server 2003 without doing ForestPrep & DomainPrep - if they've already been done you don't need to do them again. -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: exchangepedia.com/blog ------------------------------ "mike3004" <...

Windows Welcome Screen Login Looping Problem
Up until now no startup problems whatsoever with my system. Today, I press the start button and it boots fine to the Windows' Welcome Screen. When I click on my account icon (no password ever entered) it tries to login (I see my desktop for about 4-5 seconds) but it comes back to the same Windows' Welcome Screen after about 5-10 seconds. My significant other also has an account icon and when she tries to login from the welcome screen she can't get pass the screen either and gets the same 5-10 seconds looping problem that happens to me. System specs: Dell Deminsio...

Urgently need help
Hi, I want to create a formula i.e. Based on the entered cell data the next cell data should be specific. Example: If I entered 20033a in A3 cell then the answer in B3 cell should be Australia and if A3 cell value contains b letter it should be NZ else if The cell value is c then something else. This should come either we drag the cells or whatever it is. Please help me how to do this. If will be appreciable if i get the solution asap. Thanks in advance Jyothi ...

Sorting in VBA
I have a *large* amount of data that I need to sort and have available on disk for easy access. It's about 20 million items, and about a gigabyte. I thought that probably a tree is the way to go. I imagine this has already been programmed many, many times in VBA, so can somebody kindly point me to some code please? -- Murphy's ultimate law is that if something that could go wrong doesn't, it turns out that it would have been better if it had gone wrong. When you have your data sorted, how do you plan to access it? I'm sure that Sorts have been prog...

Urgent--can't create new accounts
New customer, new install, importing accounts from txt list created from old accounting system Import ran fine, followed proc in the knowledge base, and accounts are created. Run Check Links, creates the GL00105 index table, no errors, select count(*) from GL00100 and GL00105 are the same. But we can't create new accounts. "Sorry, this record has been created since your last attempt to create it" Followed the knowledge base article to correct this (delete from GL0105), and am still getting this error, and can't create a new account. Any help or ideas is greatly appre...

And how to print pdf-document from Access via VBA?
hi I also would like to print my document from access to paper and to pdf- document but is it possible via VBA? hanski Take a look at http://www.devhut.net/index.php?lang=en&pid=0000000029 -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "hanski" wrote: > hi > > I also would like to print my document from access to paper and to pdf- > document but is it possible via VBA? > > hanski > . ...

Urgent urgent urgent
Please Can you help me in that as soon as possible? When I try to connect 2 machines with single database on our domain it is showing me the attached error. Is there different kind of license to run 1 database on 2 machines-POS. [IMG]http://up4.w6w.net/upload/05-03-2006/w6w_2006030517123168130cdc.JPG[/IMG] http://up4.w6w.net/upload/05-03-2006/w6w_2006030517123168130cdc.JPG Or is there a way to update quantity from hq or transfer quantity from store A to store B? We want this to be done within 1 minute at least. I will try to explain you the problem in details: For ex. We have 2 POS ...