last_row

  1. K

    Error when selecting range of variable size.

    Hi- I haven't had much need to write VBA code in a few years, so I'm pretty sure this is straightforward. I'm trying to copy paste a range of variable size and am getting a '1004' error when selecting to the right. Basically, I have input data, and then output data which applies formulas to...
  2. S

    Calculate the Number of Date Entries Corresponding to the Month and Year of Todays Date

    Hi, I have a large workbook comprised of sheets dedicated to a specific product. Each product sheet has a list of dates. I’m trying to create a macro that would tally the number of date entries corresponding to the month and year of todays date. So if today is “13 June 2019” the macro should...
  3. S

    Nothing happens when sub is executed

    I'm trying to be more concise with my code so I've attempted to set variables instead of activating sheets as I go. However, it appears as though nothing is happening after I hit execute. The point of this sub is to copy all rows with a blank value in column "O" from two worksheets and paste...
  4. E

    Naming a sheet and using in formula

    Hey everyone, I've created and named a sheet based on a list in another sheet. Which works great: Dim WB As Workbook Set WB = Workbooks("Workbook") Dim List As Worksheet Set List = WB.Sheets("Sheet1") Dim r As Integer Dim Last_Row As Integer Last_Row =...
  5. L

    Conditional Formatting rules are cleared out after running the code

    Hi Experts - i have a problem with my code. I have a conditional formatting rules i set that highlights the cell if it has a value of FALSE or DUPLICATE. It works right after i set the rules however the rules get deleted after running below code. Do the rules get deleted by any of the codes...
  6. J

    VBA copy range error

    This code want copy. Error: object required. Sub last_row() dim last_row as integer dim rangecopy as range last_row = Range("B" & Rows.count).End(xlup).row set rangecopy = range("a1:" & last_row).copy debug.print rangecopy.address end sub
  7. J

    VBA error ouside type block

    Statement invalid outside of type block: Sub last_row dim last_row as integer rangecopy as range last_row = Range("B" & rows.count).end(xlup).row rangecopy = range("A1:I" & last_row).select debut.print rangecopy end sub
  8. J

    VBA select range with variable

    Trying to select a range but get a run time error 1004: Sub last_row() dim last_row as integer last_row = range("B", & rows.count).end(xlup).row range("A1": & "I"&"last_row").select end sub
  9. J

    VBA Immediate window

    Have written a macro to identify the last used row in a column: sub_find_last_row() dim last_row as integer lastrow = range("B2"), range("B" & rows.count).end(xlup).row end sub I want to test if a row number was assigned to the variable so I open immediate window: ? Last_row But no number...
  10. A

    VBA: Alert if Base or 2*Base

    Using Excel 2010. I want Excel to alert me if a cell value is NOT equal Base or 2*Base, but when a call is NOT Base, it could be 2*Base, or vice versa; hence Excel always tell me it is wrong. How should I modify my below code? Thank you Sub SubTotal_test() Dim k, i, j, minim, countleft...
  11. redspanna

    Copy underlined text

    Hi all, Let me try explain what I'm trying to achieve.. A worksheet is activated using the ref from cell A1 of the 'Front' sheet, so if A1=3 then sheet called '3' is activated. Then from row 39 of that particular sheet (Column C) copy any text that is Underlined then paste this into the next...

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