Announcement

Collapse
No announcement yet.

Anyone Familiar with VBA in Excel?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone Familiar with VBA in Excel?

    No need to bother pasting my code or what I need help with unless I know someone is familiar with both VBA and Excel. I hope someone is familiar though! Thanks!

    Keith

    #2
    BUMP!

    People in here talk a lot!

    Comment


      #3
      Originally posted by kmillerusaf View Post
      BUMP!
      Pregnant
      Mobo : Asus P8777-V LX2 Processor : Intel Core i5 3570K 3.40GHz @ 4.40GHz Memory : 8Gb RAM
      Graphics Card : GeForce GTX 690 Sound : Asus Xonar DGX 5.1 O/S : Win7, Monitor : 3 x Samsung 23"

      Nikon D7100,
      Nikkor 16-35mf f4
      Sigma 120-400mm
      Nikon 18-55mm kit lens,
      Sigma 70-300 APO Macro,
      Nikkor 50mm f1.8,
      Sigma 150mm f/2.8 EX DG Macro HSM,
      Sigma 10-20mm f4-5.6 EX DG,
      Sigma 17-70mm f2.8-4.5 HSM,
      Sigma x2 TC
      Remote shutter release ,
      Raynox D250 closeup/macro attachment,
      Kenko extension tubes,
      reverse lens adaptor,
      Nikon SB800 flash,
      Vivitar 285HV Flash unit,
      Tripod (x2),
      Monopod



      Rage3d flickr Group

      Comment


        #4
        Not quite sure I understand what you are hinting at? Can you help?

        Comment


          #5
          He's saying don't be so damn nervous

          Would help if you would tell what ya need anyway?
          Don't panic

          Comment


            #6
            either that or post it in our popular programmers section

            Comment


              #7
              I'm not scary.... I have just come in contact with only 1 or 2 people who are familiar with VBA and Excel well enough to offer some insight... Basically the code is this:

              Public Function FGs(ByVal MyNum As String) As String
              Dim ScoresFG As String
              Dim x As Variant
              Dim i As Long
              ScoresFG = MyNum
              x = Split(ScoresFG, "-", -1)

              For i = 0 To UBound(x)
              Debug.Print x(i)
              Next i

              End Function

              Right now, I am just looking for it to take a string of values from one cell formatted as 40-61-33 (test values) and display the string as different values into another cell... All I keep getting is a blank cell as the result.

              My goal eventually is to have this split the values into the array like above, compare them to an IF statement (posted below) and tally up all the values. I made a fantasy football stat tracker in Excel to get out of paying for one... I think it's ridiculous to pay for something I can make.

              If MyNum <= 39 Then
              FGs = 3
              ElseIf MyNum > 49 Then
              FGs = 5
              Else
              FGs = 4
              End If

              Comment


                #8
                I know a good bit of code but to be honest the best place I have found for such help is www.ozgrid.com and www.excelforum.com

                Be prepared at ozgrid as it is a HUGE forum and the mods are really tight ship, unlike anywhere I have ever seen. They do however strive to answer quick and precise.

                Comment


                  #9
                  Haven't dealing with excel+vba for quite some time since switching to OpenOffice. But you could try this:
                  Code:
                  Public Function FGs(ByVal MyNum As String) As Long
                  
                  	Dim x As Variant
                  	Dim i As Long
                  	Dim score As Long
                  	
                  	x = Split(MyNum, "-", -1)
                  
                  	For i = 0 To UBound(x)
                  		score = CInt(x(i))
                  		If score <= 39 Then
                  			FGs = FGs + 3
                  		ElseIf score > 49 Then
                  			FGs = FGs + 5
                  		Else
                  			FGs = FGs + 4
                  		End If
                  	Next i
                  
                  End Function
                  Last edited by madyasiwi; Jul 30, 2008, 08:04 PM.

                  Comment


                    #10
                    i did a bit of coding in vb for excel about 2 years ago, but haven't done anything since, and i'm a bit drunk at the moment so i'll have a look at it later if you are still having issues.
                    remember, there are quite a few examples that come with excel that you can have a look at.

                    Comment


                      #11
                      Thanks to all that I replied.. I actually with the help of someone on IRC came up with the solution and it works exactly the way I wanted. Thank you all though!

                      Comment

                      Working...
                      X