Search:

Type: Posts; User: Joe4; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 1.50 seconds.

  1. Replies
    5
    Views
    43

    Re: VBA to define variable using if then

    Best practices says not to use reserved words (names of existing functions, properties, and methods), like "name", as the name of variable, procedures, or functions.
    It can cause ambiguity,...
  2. Replies
    5
    Views
    43

    Re: VBA to define variable using if then

    You only use the "Set" keyword when setting objects like ranges, not variables like strings, i.e.

    Dim name As String
    If ComboBox2.Value = "Bill" Then
    carrier = "Bill@gmail.com"
    ElseIf...
  3. Re: Code to work to specific row and not whole row

    Ah, OK, I see now. I missed that the column you were using to check for the last row is the same column you are entering into. That is a bit tricky, because once you enter something in there, it...
  4. Thread: IF statement Help

    by Joe4
    Replies
    2
    Views
    28

    Re: IF statement Help

    Welcome to the Board!

    If you do not want to see "FALSE" if none of the conditions are met, then you need to tell it what to return in that case. So you need to add a FALSE clause in your last...
  5. Replies
    1
    Views
    32

    Re: Help with IF formula

    Welcome to the Board!

    Use a COUNTIF formula to count how many times "yes" occurs, and wrap that in an IF statement, i.e.

    =IF(COUNTIF(A1:D1,"yes")>=2,"test","")
  6. Re: Code to work to specific row and not whole row

    You need to update row immediately following the other one too, in exactly the same way (hopefully, you are following along so it makes sense, so you are able to understand and employ these changes...
  7. Re: Code to work to specific row and not whole row

    OK, so you can find the last used row in column B like this:

    Dim lr as Long
    lr = Cells(Rows.Count, "B").End(xlUp).Row
    Then, instead of using the entire column B like this:

    If Not...
  8. Replies
    3
    Views
    50

    Re: don't copy sheet with specific name

    You can add a line of code to your existing code to exclude copying sheets of certain names.

    If you post your code, and the name of the sheet you DON'T want to copy, we can help you amend your...
  9. Re: Code to work to specific row and not whole row

    What column should we use to determine where the current last row of data is?
  10. Re: Copy one whole worksheet into another whole worksheet taking too long

    Sounds like you found the proverbial straw that broke the camels back!

    I am guessing that you are probably using Excel like a database, which can be done, but is usually pretty inefficient to do...
  11. Replies
    3
    Views
    76

    Re: VBA Email notification

    Just note that they can get around this by disabling Macros/VBA when opening the workbook.

    What I have seen some people do is hide and protect the sheet so that no data is shown, by default, and...
  12. Re: Copy one whole worksheet into another whole worksheet taking too long

    So, that is roughly 25000 calculations, times 2 (2 sheets), so 50000 calculations.
    Are there are any other sheets or calculations in this workbook?
    How about any VBA code?
    Or links or hyperlinks...
  13. Re: VBA loop within a loop, to identify identical values

    Assuming that your data is in columns A and B, the header is in row 1, so the data starts in row 2, and "Mark" is in column C, put this in column C and copy down:
    ...
  14. Re: Copy one whole worksheet into another whole worksheet taking too long

    How many formulas are we talking about?
    What kind of formulas are they?
  15. Re: Copy one whole worksheet into another whole worksheet taking too long

    What if you temporarily turn off screen updating and calculations while copying, i.e.

    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    Sheets("Sheet1").Select...
  16. Replies
    1
    Views
    41

    Re: Count data between dates

    Take a look at using the COUNTIFS formula.
    See: https://exceljet.net/formula/count-cells-between-dates
  17. Re: Combine/Join 2 tables and get an output in 3rd table

    You are welcome.
  18. Re: Sumifs / sumproduct that contains multiple columns

    Welcome to the Board!

    If your data starts in row 2, place this formula in cell G2 and copy down to G5:

    =IF(A2="Red",B2,0)+IF(C2="Red",D2,0)+IF(E2="Red",F2,0)
  19. Replies
    3
    Views
    81

    Re: Clear Columns from "F" to the Very End

    You can use the reference number of the columns ("A"=1,"B"=2,"C"=3,...) to do it like this:

    Range(Columns(6), Columns(Columns.Count)).Clear
    Note that it is not necessary to select the columns...
  20. Replies
    5
    Views
    620

    Re: Help with access query expressions

    You are welcome.
  21. Replies
    1
    Views
    253

    Re: Database as weekly reminder

    Cross-posted here: https://www.accessforums.net/showthread.php?t=78813

    While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in...
  22. Re: Formula to convert currency cost into a percentage

    You are welcome.
  23. Replies
    16
    Views
    737

    Re: Updating Linked Tables to Back End Problem

    See here: https://stackoverflow.com/questions/15473263/update-an-access-linked-table-to-use-a-unc-path
  24. Re: Formula to convert currency cost into a percentage

    What custom format are you using, exactly?
    What does it show in those cells if you change the format to General?
  25. Re: Autofill goes past Last Row, Last row identifies correct Row

    You are welcome. Glad I was able to help!
    :)
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4