Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Skip, I read the last post before I read yours. I sencerely thank you all the time and effort you put into helping me. I apologuize if I abused your genererous sharing of your knowledge. Once again thanks.
  2. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    I was unaware that I had violated this forum's code of behavior. I though that Skip and I were involved in one entended conversation. Where I come from you thank people at the end of a conversation or when an issues is resolved not after each sentence.
  3. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Skip, The program runs until it gets to about line 5700+ then it gets into some sort of loop going down to row 6800+ then back upto 5700+. It cycles through the loop 3 or 4 times and then my notebook crashes. I am looking at the data in the region where the fatal loop starts and ends to see...
  4. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    The value in cell B4 on wsFirst QT is A100. The value in cell B2 on wsPrepared_Expense is A100. I have created awork book with a wsQT and a wsPE with enough real data to test all the things the program should. Would you like it? If so how do I get it to you? My email address is...
  5. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    I get a type mismatch error at; Do While (.Offset(r, 0).Value = rngGMPCA.Value) The Loop is iterating through DAFRPCAs as long as the DAFRPCA equals the GMPCA. Is it necessary to tell the program that's dealing with rngDAFRPCA somewhere before the loop? When the Loop ends does the program get...
  6. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    This is what the code looks like. It is still adding a row with each increment of the Do Loop at the end of the records on PE and no data is being transfered from QT to PE. Sub PCA() Dim wsPE As Worksheet, wsQT As Worksheet Set wsPE = Sheets("Prepared_Expense") Set wsQT = Sheets("First QT")...
  7. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Skip, I misspoke in my last message. I thought that there was code changes in the box in your last message, there weren't so I have changed nothing.
  8. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Skip, I will make to code changes on the train and will get back to you when I get home. I have to go to catch my train. I stayed late yesterday and caught the last one but I can't do that today
  9. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    How would you determine what the "ENTIRE USED RANGE on the PE Sheet" is? In my orginal code I initialized variables outside the loop. With the following code; 'This initializes the variable for the first match. Set rngDAFRPCA = Sheets("Prepared_Expense").Range("Q2").Offset(1, -15) 'Range _...
  10. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    The first rngCopy should be CB4:CE4 on QT. The code is getting rngGMPCA from B4 on QT as it should. Does the following statement say do something at R13708 not R2 where it should start? Set rngDestin = wsPE.Cells(.Rows.Count + .Row, "R")
  11. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Yes, but there is nothing in it. Do you want to see the code as it exists now?
  12. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    I added the code. When I F8 through once wsPE.UsedRange.Row value is 1 and wsPE.UsedRange.Rows.Count value is 13708. When I F8 through a second time wsPE.UsedRange.Rows.Count is incremented by 1 to 13709. Can't detect any errors but no data transfered from QT to PE.
  13. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Skip, here is what the code now looks like. I had to change With rngGMPCA to With rngDAFRPCA and (.Offset(r, 0).Value = rngDAFRPCA.Value) to (.Offset(r, 0).Value = rngGMPCA.Value) for the loop to execute. The Destin here should be the same as if data was being transfered from wsQT except the...
  14. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    What part of your code does this? If rngDAFRPCA = rngGMPCA Then Sheets("First QT").Select rngToCopy.Select Selection.Copy Sheets("Prepared_Expense").Select rngDestin.Select Selection.PasteSpecial Paste:=xlValues...
  15. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Does you code say as long as the GMPCA equals the DAFRPCA Then do what ever is in the Do loop? Which at the moment is nothing. If this is true then the Do loop needs to copy the rngCopyTo to rngDestin and move to the next row. Putting the code where your questions into the loop are does not...
  16. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    The code below inialized the variables. Do I put this above your With statement? 'This initializes the variable for the first match. Set rngDAFRPCA = Sheets("Prepared_Expense").Range("Q2").Offset(1, -15) 'Range _ must be in the same row as the start of DAFRPCA data. Set rngGMPCA...
  17. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    Process: There are two different systems (Grants Management (GM) and Budget Execution (BE)) that are alleged to track the same expenditures but each uses a different characterization of expenditures. The GM expenditures are presented by associated with individual grants. The BE expenditures is...
  18. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    I incorporated the code you suggested after the "Else" and commented out my original code. When I run the code now there is no transfer of data when the DAFRPCA changes. If the code was matching on A100 and the DAFRPCA is now A101, the last line where the DAFRPCA is A100 has no data transferred...
  19. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    1. The Find method requires a variant and not a range object as an argument. The code works for the first 325 records. There are 16 instances where it must fine a match and it appears to do so. Only when there are two consecutive non-matches does it invoke a runtime error and stop. Is this...
  20. RSJohnson

    VBA Excel: Don't Kknow right syntax to Set a variable's value

    I am matching data in cells on different worksheets in the same workbook. When the data matches I copy some data from sheet 1 to sheet 2. If they do not match I insert a string where the data would have gone on sheet 2. In many cases there will be multiple records with the same unmatchable data...

Part and Inventory Search

Back
Top