lastrow

  1. E

    Selection Change Macro Error when Autofilter Hides Row

    I have a selection change macro in a file that updates only when the selection occurs in the "NIIN" column of values. The macro works fine unless you apply a filter (from the preapplied AutoFilter) that hides the row that is currently being graphed and even if I select a now visible cell it...
  2. A

    help adjusted code delete empty row when transfer invoice from sheet to another

    hello, my code works but i need adjusted code when i press my macro ignore the empty rows from a19:e31 when delete these rows i suggest to be condition if a19 to a31 =0 then delete theses rows Sub TransferData() Dim Target As Range Dim LastRow As Long Dim R As Long...
  3. I

    Slight edit to existing working code

    Evening, I am using the code below but need to apply a slight change to it if you could advise please. Currently the code does not function on column 4 which is fine BUT i also wish it now not to work on column 4 and 7 Private Sub Worksheet_SelectionChange(ByVal Target As Range)...
  4. spencer_time

    Active worksheet as variable broken

    Hello guys, I need help again. I have a snippit that works when the sheet is defined (sheet3) but doesn't work when I try to make a variable for the active sheet (ws). I get an error that says "object doesn't support this property or method" and when I press debug it highlights my variable ws...
  5. D

    Hide columns that have whole rows TRUE

    Hello all, I have some table build up from different formulas and so on. Final result is some huge sheet filled with columns and lots of rows showing just True or False. I'd like to know how i could hide all columns that are all their values True, so i can just end up with just the False...
  6. G

    Vba Delete row if data from another cell exists

    Hi, I have the below code however I need to change it to reference cells C4-C4 and delete the row, if Column H contains the data typed in cells C4-C7. Thank you for any help . Sub Loop_Example() Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long...
  7. S

    Help to set lastrow, lastcolumn minnimum

    Hi all I want to set lastrow always "> 4" and lastcolumn always ">6". I have code belovew and work well but I thinks have a better way to do. Could you have any suggession to do? My code is: Sub clear()Dim lrow As Long, lcol As Long Application.ScreenUpdating = False With Sheets("result")...
  8. T

    VBA - Copy.Range to paste values only?

    Hi, I am writing some code to copy and paste a range from one sheet to another but the code is bringing the formula through to the new destination whereas I only need the values. Current code: Dim Arange As Range, Drange As Range, Crange As Range, Trange As Range Set Arange = ws.Range("A3:A"...
  9. J

    Cleaning up records

    Hello: I have part of a macro that needs to clean up cells and replace the bad data with the good data. I'm using a loop nested if else, but is there a more efficient way? This looks cumbersome. Any help would be appreciated . Thank you! Sub cleandata() Dim i As Long Dim DataValue...
  10. E

    Dim lastrow As Long not working?

    Can anyone help please? It looks right to me but when the macro finishes, it pastes my formula in AC1:AC3. There are breaks in the data however, by pressing Ctrl and End it takes me to cell AC520. Sub ConsolidateTimeSheets() Dim Wbk As Workbook Dim ws As Worksheet, wsData As Worksheet...
  11. S

    Create 3D Cell References with Macro

    Hi all... me again *sigh* I am trying to create a macro that will create a 3d-reference to another sheet - all references need to be added to the sheet 'Reminders' and will be based on the values in the active row on the active sheet. I kinda had two macros that did bits of what I wanted and...
  12. A

    Copy/Paste and remove duplicates

    Hi all I have done a macro to copy data from sheet2 to sheet 3 then remove duplicates, however it doesn't work, please could anyone help? Sub Reconcile() Dim LastRow AsLong LastRow =Range("A" & Rows.Count).End(xlUp).Row Sheet2.Select Range("F2:F" & LastRow).Select...
  13. L

    VBa automatically run macro if cell changes

    Hi all, I want to make the spread sheet automatically run this macro code when a number is inputted into column B what code do i need to add to it Sub Ratio_BC() Dim Lastrow As Long Application.ScreenUpdating = False Lastrow = Range("B" & Rows.Count).End(xlUp).Row Range("D2:D" &...
  14. L

    VBA autofil formula in Collumn D if data is inputted into column B

    Hi all, I am in need of a VBA code to be able to autofill this formula "=IF(ISNUMBER(--MID($B:$B,SEARCH("241",$B:$B),3)),MID($B:$B,18,10),0)" into column D anytime datat is inputted, this is an attempt to limit the amount of formula's are in the sheet as i dont want to have to copy the formula...
  15. D

    Move row then delete blank

    Hi all, could someone help me mod this to delete each blank row after it has moved the data to another sheet. Currently, it works when there is only one "Y" marked row but, if there are multiple rows, it does not delete any of the blank rows. Sub Move_Closed()Dim Check As Range, rng As Range...
  16. D

    VBA mod

    Hi all, can someone help me to mod this so that when the rows identified are moved to another sheet the subsequent blank row is deleted from the source table, please? Sub Move_Closed()Dim Check As Range, r As Long, lastrow2 As Long, lastrow As Long Application.ScreenUpdating = False lastrow =...
  17. A

    VBA code is not working

    Hi, I am getting "Application-defined or object-defined error" error msg for below codes.. Not able to figure out where i am going wrong. Please help Sub conditionE() Dim lastrow As Long lastrow = WorksheetFunction.CountA(Worksheets("2018_T933").Range("A:A")) With...
  18. K

    vba print area

    hello all, i have a worksheet with column A-I, row 1-250. however i'm not necessary to use every row every time. the question is how can i simply set the print area automatically to last row thus i can use less paper?:rofl: it seems my code below will goto row 250 every time and i will print...
  19. H

    Conditional Formatting

    I'm using this code to try and conditional format the rows with the values shown below. My problem is "Red" is the only color that's working, and i don't know why. Dim i As LongDim Lastrow, Lastcolumn As Long Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To Lastrow...
  20. TAPS_MikeDion

    ComboBox list ends with 2 blank rows of data ???

    Hi all, I'm sure I'm missing something small, but does anyone know why I have to use "LastRow-2" in the code below to keep from ending up with 2 empty rows of data at the bottom of my ComboBox list? I guess I would get it if I had to use LastRow-1 since the array might be putting in an extra...

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