Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Hey coders got a (hopefully) easy one VBA

  1. Default Hey coders got a (hopefully) easy one VBA

    Sub moveyesdata()
    '
    ' moveyesdata Macro
    '
    ' Keyboard Shortcut: Ctrl+q
    '

    Columns("A:R").Select
    Selection.AutoFilter
    Range("C1").Select
    ActiveSheet.Range("$A$1:$C$10000").AutoFilter Field:=1, Criteria1:="XX"
    Range("A1:C1000").Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    ActiveSheet.Next.Select
    Range("A1").Select
    ActiveSheet.Paste
    Range("A1").Select
    ActiveSheet.Previous.Select
    Range("A1").Select
    Application.CutCopyMode = False
    Selection.AutoFilter
    Range("A1").Select
    MsgBox "Completed"
    End Sub

    How would I change this to add in that in Field 18 we need less than 100 (the number)?

    Criteria1 is already filled just edited out for obvious reasons.

  2. Default

    ohgod i haven't done vb for years. I have too many projects to code to take a look at this right now :/.

  3. Default

    I know it should be easy right? Stupid simplistic code :P

  4. Default

    i finished my project faster than i predicted tonight. If you could format exactly the way it looks I can take a look at it. Also, what are you trying to do with it?

  5. Default

    If you format it and/or add a screen shot I'll look into it as well. My laptop just crashed and I had to start from scratch soooo I won't be able to toy with it, but I have no problem giving suggestions.

  6. Default

    Lol that's a VBA script for a macro in Excel. It finds something I specify and copies it from one sheet to the next (filtering ) So I'm trying to add a way to make it filter another thing at the same time...say a word and a number. From field 18. Only problem is when I put Field:=18, criteria1:"XX" It breaks at Field:18. Idk why. I just need to filter two things out.

  7. Default

    Quote Originally Posted by Assassin View Post
    Lol that's a VBA script for a macro in Excel. It finds something I specify and copies it from one sheet to the next (filtering ) So I'm trying to add a way to make it filter another thing at the same time...say a word and a number. From field 18. Only problem is when I put Field:=18, criteria1:"XX" It breaks at Field:18. Idk why. I just need to filter two things out.
    you should put the actual code you're trying to run. not a skeleton with the request to add to it.

    i at least troubleshoot better when i can see the erroneous code.
    Quote Originally Posted by OMGBEARS
    I feel it is important for me to let you know how feeble your efforts to strike such feelings inside of me really are. I have the internal fortitude of a large animal, an elephant, for instance. Likewise, I'm the result of coitus between the devil and a pack mule made out of chainsaws, so I am extremely strong, and carry little care for others in this world. Trees also stand aside due to my chainsaw blood.
    Quote Originally Posted by ๖ReS View Post
    How am I supposed to tell you to fuck off without replying ?

  8. #8

    Default

    excel blows balls, use it every day. Try using the formatting tool for that specific cell
    Personal reform

  9. Default

    That is the macro's code in it's entirety. It doesn't have a form or anything nothing to push (which is wierd for VB I know) but I just put that in Excel's developer area and run it and goes.

  10. Default

    That's weird. lol. What is this for? haha.

    ActiveSheet.Range("$A$1:$C$10000").AutoFilter Field:=1, Criteria1:="XX"

    You said it breaks when you put "Field:=18" does it break with your put "Field:=1"?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •