lastrow

  1. E

    Check 2 cells from source to master file, if match, highligh cell X in master

    Hi all, Context: I have three error-checking columns in source file, worksheet "MrExcel". If there is a Y in any of the columns, goto columns A and B. If columns A and B matches with columns A and B of master file, worksheet "MrExcel", highlight cell A1 in that master file Private Sub...
  2. L

    VBA Add FillFormat to MAcro

    This Macro fills Formulas to Last Row I need it to also fill formats as well Dim LastRow As Long LastRow = Cells(Rows.Count, "A").End(xlUp).Row Range("W4:AA" & LastRow).Formula = Range("W3:AA3").Formula
  3. R

    Excel VBA: For loop - Write value of row number

    The way my code currently works is like this: ws1 has multiple columns and rows of data. The first cell on every row in column A is the title. The titles are from a fixed selection (it's a drop down) which are determined by a list that is on ws2 ws2 has the list of titles, which is h3 until...
  4. F

    Minimum range of variable

    Hello, I have a "variable" (I think its called), called LastRow. And LastRow will find the latest row with data in special column. But if LastRow is empty. It will cause problems and delete information. Can I in some way set a minimum LastRow range? All help would be awesome! LastRow =...
  5. A

    Autofill skipping blank cells

    Hi I am using the below code to autofill the formula however there are blank cells in column C I want the same cells in column in S to be blank... Below code is inserting the formula in all the cells.. Sub insert() Dim LastRow As Integer Range("S:S").EntireColumn.insert Range("S1").Value =...
  6. H

    Search Left

    Hi - I'm using this code as a vlookup. Is there a way to alter the code so that i'm only looking up the first 3 digits of the value in Column 6 on Sheet6? Dim LastRow, LR1, LR2, LR3, i As LongDim Searchfor, j, inarr As Variant Set wsRS = Sheet6 Set wsDT = Sheet2 With wsDT LastRow =...
  7. imback2nite

    Worksheet Deactivate

    I'm trying to get a handle on 'Deactivate'. My biggest problem are the users that forget to update the worksheet. I've been using the Command button and here is the code. It works but only when the users hit it. Sigh... Private Sub CommandButton2_Click() Application.ScreenUpdating = False...
  8. T

    Autofill Formula To Specific Column

    I currently have this: Dim lastrow As Long Dim lastcol As Long Sheets("Template").Select Range("v13").Select lastrow = Range("S" & Rows.Count).End(xlUp).Row lastcol = Range(11, Columns.Count).End(xlToLeft).Column Range("V13").Formula = "FORMULA HERE" Range("V13").AutoFill...
  9. K

    code help

    The following code never gets to the ELSE and always displays the message box. I suspect that it is because when I print the variables lastrow is right justified and rowfound is left justified so they are not both numbers. But I am not sure and if so I don't know how to fix it. 'Get Row...
  10. A

    code transfer data from sheet1 to sheet2 and delete some rows with condtion

    hi, guys i would help me to code here i have sheet1 from range a2:e91 when i fill data and transfer data to sheet2 i would delete rows which contains cells a =" " then delete also not effect rest of cells like the total because it depends on last rows (the total = a88:a99)...
  11. E

    lastRow Function

    Hi all, So I have sheet that has data pasted in column A. There is a lot of data. In Column B I have a formula and I want this formula to be pasted in all cells in which A has a value. So for example if column A's last row used is 1000, I want this code to paste the code in B but only to 1000...
  12. R

    Excel VBA: First execution of Advanced Filter returns header, and then the filtered results

    I have an Advanced Filter set up in my spreadsheet, and rather than showing all of the filtered results at once, I have it set up so it cycles through them one by one. But I have noticed that the first time I click the button that executes the script, it returns the header value first and then...
  13. Z

    Email file if checkbox = true

    Hi, I have a userform that populates checkboxes dynamically based on a user list on one of my worsheets. I'd like to send an email to all of the users where the checkbox = true. How do I associate an email with each of the checkboxes? Further info: The user list is in column A and their...
  14. Z

    Set checkbox value to true

    I have the following code that creates a list of checkbox items on my userform based on cell values on a worksheet. How can I set each of these checkboxes to default as true? If possible, I'm also looking for a way to set the size of the userform based on the number of checkboxes created. For...
  15. S

    Help editing this macro so it will only use amount of cells it needs for the result

    I have to set the range on this macro before I run it. If it would only create the amount of cells needed to complete the macro. It works well and will give results to multiple sheets, sometimes I'm getting millions of results that exceeds the row limitations. If I set it to Const maximum =...
  16. E

    Pasting Data in Different Locations

    Hey everyone, Is there a VBA macro to have data paste in the next free row, but have different cells paste not in order? Sheets("Sheet1").Range("B18:B19").Copy Sheets("Sheet2").Activate lastrow = Range("A65536").End(xlUp).Row Cells(lastrow + 1, 1).PasteSpecial...
  17. R

    Find last row that is empty, insert picture (code not recognising cells with images in already)

    So my code currently works like this: - User clicks insert button - Button launches a file browser - User selects file (an image) - The code assigns a variable (filename) to the file path - It then inserts a rectangle shape on the last empty row - The image fill is made to be the image...
  18. M

    VBA URL to image (debug error)

    H Guys - I have this code that deletes any images on the worksheet and then takes the url address in A2 and displays the image from the address 4 columns to the left. Public Sub Add_Images_To_Cells() ActiveSheet.Pictures.DELETE Dim lastRow As Long Dim URLs As Range, URL As Range...
  19. U

    Using the Range Current Region

    Would you know how I can remove the range " Range("A9:A20" & lastrowcount).Copy " and have the code continue reading down the rows without copying the next block of data, specially if Ranges will change over time. First block of data could reach 200 rows going down. Second block normally...
  20. P

    Adding data with a search userform & then populating another userform with values..

    Hi Team. Bit hard to describe here, but what I am doing is adding an address from a list onto a datasheet, using a userform,(oddly enough called "SearchUF"). So the code adds the new address in Col B using xlup and the remainder of that row is populated using a series of formulas. Which works...

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