end if

  1. D

    VBA one cell returns date of last time another cell was edited

    Hello everybody, I currently have the following: Where column: I = quantity J = subtract any number entered from the quantity after which the number entered will be subtracted in column I and disappear in column J so you can enter a new one in the future J = add any number entered from the...
  2. bepedicino

    End Macro if Range is Blank

    Hello, I am hoping to get some VBA help to end a macro either before or after the copying if the selected range is blank. Here is the current VBA I have in please. Sub CopyRange () Range("A2").Select Range("A2:G2", Range("A2").End(xlDown).End(xlToRight)).Select Selection.Copy...
  3. T

    Print If ComboBox5.Value=Range("K8")

    Im having issues with this code This is what i would like the code to do - ComboBox5.Value = Range ("K8") if true print if false MsgBox "Incorrect Revision" If ActiveSheet.Name = "VAM PINS" = True Then If ComboBox5.Value = Range("'VAM PINS'!$K$8") = True Then End If ActiveSheet.PrintOut...
  4. J

    why dim?

    would I ever need to ues or start with a dim? It always seams to work with out one. Foe example : Sub Cake() Dim jb As String jb = InputBox("do you like cake? Yes/No", "CAKE") If jb = "Yes" Or jb = "yes" Then MsgBox "Go For It", , "GOOD" End If If jb = "No" Or jb =...
  5. B

    End If without Block If AND Block If without End If Error

    Okay so below is the code. Basically what happens is that the compiler throws an "end if without block if" error and when I add an end if where required, it throws a "block if without end if" error - so what am I missing in the code then? Private Sub UpdateCommentPic(ByVal Rowno As Integer...
  6. D

    VBA code calculate commissions

    Status B & C: commission + 3% bonus ; Status A: commission only Status A is calculating correctly, but B & C is not. I'd appreciate any help with this. If StatusCode <> "A" Then Bonus = 0.03 Commission = CommissionRate * Bonus * SalesAmount Else Bonus = 1 Commission =...
  7. S

    using end if inside an if loop

    my code looks like this so far legend for coding/question below newvariable is the variable name for an inputted value ...A actions -the commands if the value is A ...X actions - commands if the value is not A or B if newvariable = "A" then ....A Actions else .....X Actions...
  8. S

    Simple Loop Question

    Hello to those that take the time to read this and thank you. I am not asking for anyone to do my homework only I have not been able to find a solution so far. Scenario: I need a macro/VBA to look in a range of about 20 cells. The cells have an if statement that pulls data from a cell...
  9. N

    Help with Else/If statements

    I'm new to writing macros and would like to check if a Sheet name contains a '#' or not.. ie: "1" vs. "1#". So far I have this: If Sheets("1#") Then Sheets("Final Schedule").Select Range("B4:Y4").Select Selection.Copy Sheets("1#").Select Range("C14").Select Selection.PasteSpecial...

Some videos you may like

This Week's Hot Topics