target

  1. D

    How to use Macros to Filter less than or equal to Cell Values

    Hello, I want this Macro to filter off less than or equal to, not just equal to. Also, if one of the cells is blank (B2 or C2) I would like it to show 'all' for that selection, rather than 'none.' Can anybody help me? Private Sub Worksheet_Change(ByVal Target As Range) Set Target =...
  2. R

    Lookup Question

    Hi All, I hope I can explain this clearly. Column A is Student Name. Column B is group (either group 1, 2, 3 or 4). Column C is test mark out of 100. I have a lookup for each group. But each group has different parameters. For example Group 1: 0 to 40 = Below Target. 41 to 65 = On Target. 66...
  3. T

    How do i get this macro not to run if target is empty or 0

    Hi Everyone, I have this macro that works great but I need it not t run if the cell I secect is zero or empty. how can I do this/ p.s. if my code can be improved feel free to go ahead and change it :-) (Columns E & F are merged per row so E88:F88 etc.) Thanks Tony Private Sub...
  4. zendog1960

    1004 error

    Hello folks, I am getting a "run time error 1004 application defined or object defined" error. I am adding the code below. I would appreciate if someone could look the code over and let me know if they can find out why I am getting this. First things first: in the Range D2, I have that cell...
  5. P

    Track changes on a Worksheet in Excel with VBA

    I am currently using the following: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("O:T")) Is Nothing Or Range("W2") = vbNullString Then GoTo Skip If Range("W2") <= Range("W1") Then If Not Intersect(Target, Range("A:U")) Is Nothing Then Call...
  6. S

    VBA - Google search string in default browser

    Can anyone help with this please? This VBA project is meant to create a Google search string which opens directly in Google search engine in the users default browser. At the moment the search string is not producing the double speech marks around EACH value (which i want to keep). So if the...
  7. M

    VBA get target sum from the grid of 7*9

    Hello, I need a macro that allow me to create target sum from the grid of 7 columns and 9 rows...using technique picking a one number from each columns and making all possible targets sum can be made in the "as per specified sum target in the column S" Example below shows only one set of...
  8. P

    Combine two Private Sub Worksheet_Change

    Hi, I have below two Private Sub Worksheet_Change, how can i merge for two logic 1st VBA Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A3:A5000")) Is Nothing Then Exit Sub Application.EnableEvents = False With Target .Offset(, 2).Value = Date...
  9. J

    Set range for Multiple change events on one sheet each referring to a different range of cells

    1 change event worked on the worksheet until it got too large. I split the 1 event into two events. One titled “Private Sub Worksheet_Change1(ByVal Target As Range)” which I want to work for changes in range E38:H70 The 2nd event “Private Sub Worksheet_Change(ByVal Target As Range)” is for...
  10. E

    Application Intersect - referring to a named range

    Hi, Basically if a cell is changed within a range (q_one) I want to put a date in another range(q_one_date) in the same row that the target cell was changed. The code I got referred to a set cell range rather than a named range. I have successfully changed it to work if any cell is changed in...
  11. P

    Ambiguous name error

    Hi I have the code below but I get an ambiguous name error come up please can you help. the error comes on the line below Private Sub Worksheet_Change(ByVal Target As Range) Private Sub Worksheet_Change(ByVal Target As Range) 'This code goes in Book13, amend for book 14 'this...
  12. M

    Why is the Paste action not working for this range object?

    Hi, In the following code, I am getting error 1004 on the last line (red). All I am trying to do is copy data from an range and paste it into another range. Error: Run-time error '1004': Pastespecial method or range class failed. What am I doing wrong? Thanks Public Sub Testing() Dim Rng1...
  13. I

    Expand on current code in use

    Hi, Supplied is the current code in use. I wish to expand the code to apply a number in the corresponding cell in column E Target cells are currently in column D "name of shop" & now wish to also add in column E "mileage to that shop" Currently if i enter 1 in the target cell i then see...
  14. V

    count total among several tables

    Hi, I have a workbook with several sheets. The example used below is very simplified Each sheet of the workbook has several tables. Each table is composed the same way but there might be more or less names in the tables per sheet. For example sheet #1 might have 4 people. Sheet #2 might have...
  15. I

    Merge two Worksheet_Change codes

    Hi, I habe these two codes. Private Sub Worksheet_Change(ByVal Target As Range)If Intersect(Target, Range("J1:M3")) Is Nothing Then Exit Sub Application.EnableEvents = False Target.Value = UCase(Target.Value) Application.EnableEvents = True End Sub Private Sub Worksheet_Change(ByVal Target As...
  16. W

    Highlight active cell or selection but restore previous fill color

    Hi guys, I found this VBA code (here: https://www.extendoffice.com/documents/excel/2129-excel-highlight-active-cell.html) <code class="vb keyword">Sub</code> <code class="vb plain">Workbook_SheetSelectionChange(</code><code class="vb keyword">ByVal</code> <code class="vb plain">Sh </code><code...
  17. K

    Code not behaving properly ?!?!?!?!

    This code seems to be erratic in its behavior. Sometimes when I change a cell the ones that are not in the range i select get cleared. When I go back and fix the entry it seems to work fine and then when I change another one if might clear something else. The concept was that if I changed a...
  18. S

    How to upload Data From Work book using Connections

    I have Work book 1,2,3,4,5.... 12 in ever work book i got Target, Achievement as Area, Finance etc. i Have work book named Report.xls here i got Sum of Area of 12 work book, it percentage to target. Now i need, whenever i download workbook 1 2 3 4 etc, the report table to be updated...
  19. Johnny Thunder

    VBA Help - Combine 2 Worksheet_Change Events - Excel 2016

    Hi group, So I have two Worksheet_Change Events written out but I realized today that you can only have one per page so here is the code, can anyone suggest a revision to combine the two into one so that I can wrap up this project...
  20. H

    VBA - If Target Not Intersect Till Last Row

    Hi All, I am using the range A4:A100 since I do not know how to change it to look from A4 till the last row. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("A4:A100")) Is Nothing Then Call Macro1 End If End...

Some videos you may like

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top