rangee

  1. C

    VBA - Delete Row On Protected Sheet

    Hi, I have an auto sheet event script running on my workbook which deletes a row from sheet 1 and moves it to 2 other worksheets when completed:- Private Sub Worksheet_Change(ByVal Target As Range) If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("N:N")) Is...
  2. J

    VBA insert formula

    VBA code not working: defines the last row in a table want to take the sum from cell E4 to the last row of the table (cell LR)? Sub last() dim lr as long lr = activesheet.cells(ActiveSheet.rows.count, "B").End(xlup).Row Range("E"& lr +3 ).value ="=sum(E4: & E & LR)" end sub
  3. W

    Run code depending on row number

    Hi All, I have some code I want to run which compares the last found value in one column with another. Depending on the row number, I want to do different things. Code: lRowWS1 = sht1.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row lRow1 = sht1.Cells(sht1.Rows.Count...
  4. S

    Why is my IF statement not working?

    This is probably a simple one.. but I've tried many different ways and it won't work. The following calls the next function. If Range("E" & r).Value = 6 And Range("F" & r).Value = 6 Then This does not... If Range("E" & r).Value = 6 And Range("F" & r).Value = "_" Then This also does not...
  5. W

    VBA Keeps Looping Through One Sheet Instead Of All

    I have no idea what's going on, this code is looping through the same sheet for as many times as there are sheets in this workbook, there are 25 sheets and it is supposed to loop through all 25 of them but it is looping through the sheet (I have open when I run the code) 25 times, I have tried...
  6. J

    Need solution regarding Mod combined with Lcm in macro

    Hello guys, I’m new in VBA and can’t figure out how should I move forward. I’m using the below mentioned macro to calculate different requirements. It works fine if the frequency values in column B are divisible with lowest frequency, for example 100, 200, 400 & 500. However if there is an...
  7. R

    VLOOKUP not working when using a file selected using GetOpenFilename

    I am trying to get this code to work but having an issue. I have this code that works perfectly in one of my macros. When I run the whole thing it goes through and things end up how I want them. If I just run this sub by itself and not have it part of the main macro, it gets an error on the line...
  8. G

    VBA run-time error 1004

    I am hoping someone here can help. I have written a piece of code in a VBA Module but when I run it, I get a the following error Run-time error '1004': Method 'Range' of object '_Global' failed The intention of the code is to look at a series of results and highlight the numbers which are...

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