cellstarget.row

  1. G

    VBA code running slow

    Hi everyone hopefully this is my final question for today.:) i have a worksheet called "Fees Paid" that uses data validation in column "B", the user selects a name from the list and all other cells auto populate with matching data. Columns A, C, D, E, F, G and H, cells G & H are dates. "Fees...
  2. T

    Hidden column cells - data being added but formatting not applied

    Hi all, I have the following code which is supposed to add "N/A" to cells and colour them in green: If ch = vbOK Then Target.Cells.Interior.ColorIndex = 43 Range(Cells(Target.Row, twelvewl + 1), Cells(Target.Row, twelvewr)) = "N/A" Range(Cells(Target.Row...
  3. N

    Updating Cell Value with changing other cell value of same row

    Hello sir, I'm using code:Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("R2:R21")) Is Nothing Then Cells(Target.Row, "S") = BS2AD(Cells(Target.Row, "R")) Exit Sub ElseIf Not Intersect(Target, Range("S2:S21")) Is Nothing Then Cells(Target.Row, "R") =...
  4. B

    passing data from userform to other userform

    Hi all, I use the follow code to open Userform 2 when "x" is put in column 5 or 6. The labels on this form are filled with data from the same worksheet (Data Gel). If Target.Column = 5 Or Target.Column = 6 Then If Target.Value = "x" Then With UserForm2 .lblGelCodeR.Caption =...
  5. Z

    Range selection with generated row location

    Hello all, I'm having a debugging issue on a set of code. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count > 1 Then Exit Sub 'Initiate Work Dim lrow As Long Dim NOCws As Worksheet Dim TPws As Worksheet Set NOCws = ThisWorkbook.Worksheets("NOC") Set TPws =...
  6. E

    Userform into multiple sheets

    Hello, I have this userform: this is the sheet where the code works as I press one of the cells in the range. A2:A27 The code I have on that "Jan" sheet with the cells range for it to work. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Application.Intersect(Target...
  7. I

    Could you check my code please

    Morning, I originally had this code, Private Sub Worksheet_Change(ByVal Target As Range) ' Exit if more than one cell updated at a time If Target.Count > 1 Then Exit Sub ' Check to see if value updated is in column B or D If Target.Column = 2 Or Target.Column = 4 Then...
  8. B

    Unprotect active sheet

    Based on some earlier advice from Yongle, I've been using a worksheet to track progress on tasks, using the code below to record date, time and by who certain entries are made: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 1 Then Exit Sub 'ignore changes in header...
  9. H

    Defining the cell that causes a Worksheet Change Event

    Hi all, I have a question regarding the third answer on the following topic: https://stackoverflow.com/questions/4668410/how-do-i-get-the-old-value-of-a-changed-cell-in-excel-vba I have written the following macro: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim...
  10. H

    Coloring based on Worksheet Change Event

    Hi all, I have an Excel-file that consists of so-called tick data of stocks. The prices of these stocks change a lot and are displayed in column C. I would like to write a macro that gives the cell of each stock a color based on the price change. The color depends on whether the price...
  11. Z

    vba code to run on different sheet when active worksheet cell change

    ok so I have this macro that works perfectly fine when I'm on this sheet. This is in a sheet that is called "RL". The issue I have is that the cells in the columns 12-19 on sheet "RL" are a result of a lookup from a pivot table. So they are formulas. So when the pivot table (which is a sheet...
  12. K

    How to get application username

    Hi all, I am using the following but not getting the application username. Can anyone please help me? Thanks Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim r As Excel.Range Set r = Union(Range("A1:A5"), Range("C1:C5")) If...
  13. S

    Trying to get Excel to automatically navigate to next row and add timestamp after scanning

    So I'm trying to do 2 things, I'm scanning serial numbers into Excel and taking inventory. Cell A1 would be the serial number B1 is the date and C1 the time that would automatically populate on every scan. After Scan is done have the cursor automatically move to the next row (A2) waiting for the...
  14. N

    VBA - Conditional formatting based on multiple cell value

    HI, I am trying to add conditional formatting to a sheet in the workbook through a macro. I have multiple conditions in columns H & K & P; if column 'H' has certain value then the color of row changes based on the range. Then I want to clear the colored Row if the Column 'K' has either...
  15. M

    VBA: MATCH with multiple criteria to return row number

    I'm trying to use VBA to use MATCH to return a row number. Then use that row number in the same Worksheet_Change macro. If Intersect(Target, Range("A2:A3000")) Is Nothing Then Exit Sub If Target.Count > 1 Then Exit Sub If Target = "" Then Exit Sub Dim lc As Long, fr As Long, n As Long, nr As...
  16. D

    worksheet.change event not firing for most events

    Hey guys I've got a troublesome spreadsheet where strange things happen when the worksheet.change event is supposed to fire... The worksheet has a large table in it, using Excel's built in table functionality. The event, of course, should always fire when a cell is altered - but in this sheet...
  17. R

    Change event removes contents outside of target range

    Hello, Here’s snippet of a Private Sub Worksheet_Change(ByVal Target as range) If Not Intersect(Target, Range("B4:B27")) Is Nothing And Cells(Target.Row, "B") <> "Surveys" Or Cells(Target.Row, "B") <> "Reviews" And Cells(Target.Row, "D").Value > 0 Then Cells(Target.Row, "D").Value = ""...
  18. M

    Change userform textbox value based on combox value

    Hi All, I have a userform and I want certain textboxes to change their value dependent on the combobox value. The combobox can show 1st - 4th and I want two text boxes within the userfor to base their values on different cells within my spreadsheet. At the moment I have this, but it doesn't...
  19. F

    Error Message when no data available

    Hi, appreciate any help with this frustrating problem. I am trying to retrieve statistical data from various monthly sheets ( Jan, Feb, March etc.,) to a single master sheet. I have set the code up to retrieve the data and all goes well until we get to August. As the data is not yet available...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top