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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by chriscusick

  1. chriscusick

    If and Vlookup in VBA

    Hi Zelgar, I thought I would give your code a try, having made a few minor alterations to the code to allow for changes but it seems to be spitting out the error "Else without IF" I have pasted the code below and made the line this is coming from Bold for ease. Sub chris() Dim h$, i$ Dim r As...
  2. chriscusick

    If and Vlookup in VBA

    ok so the codes didnt copy over...I have pasted them below: Private Sub Worksheet_Change(ByVal Target As Range) If (Target.Address = "$E" Or Target.Address = "$F") Then thread707_1711339 End If End Sub & Public Sub thread707_1711339() Dim rgJtoT As Range Dim...
  3. chriscusick

    If and Vlookup in VBA

    I have had a slight play around with the coding, due to the changes asked for by my boss. Using DaveInIowa's code I altered it as such: and the main part to: The problem is this: Say for example the first set of information is "EUM Warm Lead", and the next 3 are "A&M Self Gen". when I...
  4. chriscusick

    If and Vlookup in VBA

    It's not a problem. As I said, Cell H4 and I4 will always be populated anyway. Thank you again for this coding, you have saved my sanity!
  5. chriscusick

    If and Vlookup in VBA

    Thank you Dave, this works great. My only question is that when I run the code, I have to constantly "update" cell H4 (by just selecting something from the drop down) before new entries update. For example If I populate cells H12, I12 then input something into cell J12, Cell T12 wont input...
  6. chriscusick

    If and Vlookup in VBA

    I also appear to have another problem with the code. When I copy and paste it into the workbook, then try to run it I keep getting a "Run-Time Error '1004' Application-defined or object-defined error" Why would this keep appearing and what does it mean?
  7. chriscusick

    If and Vlookup in VBA

    Ok, however there is no x=8 line. Do you mean the x=4 line?
  8. chriscusick

    If and Vlookup in VBA

    Hi Zelgar, I have copied and pasted both of these codes into my workbook and run them (with each variable) but it doesn't seem to do anything. Have I missed something here?
  9. chriscusick

    If and Vlookup in VBA

    Hi, Apologies if this explanation is a little long winded but I want to make sure I cover everything in one go. I am currently using this: =IF(H4="EUM",IF(I4="SELF GEN",VLOOKUP(J4,Sheet3!$A$3:$B$7,2,0),""),"") to return a result in Cell T4. This works fine for one particular instance but the...
  10. chriscusick

    Copying cells from closed workbooks

    Skips method works perfectly for what I need, but thanks for the link Paul, I will have a browse at it.
  11. chriscusick

    Copying cells from closed workbooks

    Where would I paste that to? Or am I overwriting the line ws.Cells(lRow, "A").PasteSpecial _ ? And is there anything else I need to add so that it copies the right cell?
  12. chriscusick

    Copying cells from closed workbooks

    I assumed I could use the following lines .Activesheet.Range("C11").Copy ws.Cells(1Row, "A").Paste" before the ".ActiveSheet.Range("F24:F26").Copy" And edit the line: "ws.Cells(lRow, "A").PasteSpecial _" to "ws.Cells(lRow, "B").PasteSpecial _" but it didnt work. So I assume I went about...
  13. chriscusick

    Copying cells from closed workbooks

    Thank You Skip you are a star! I do have one final question though which I am hoping you can help with. I was hoping to figure this one out on my own but it's eluding me... Is there a way to copy one final cell (C11) and paste this at the start of each row? I have had a little play with the...
  14. chriscusick

    Copying cells from closed workbooks

    ...and one last time WITH the selection range this time (I have no idea why it didnt put it in last time) Sub Macro1() ' ' Macro1 Macro ' Macro recorded 16/05/2013 by Chris ' ' Workbooks.Open Filename:="I:\Work\Wageslips\AnM\05\0510\Steven Thoma.xml" Range("F24:F26").Select...

Part and Inventory Search

Back
Top