lastrow.value

  1. D

    VBA Run Time Error 424 Object Required

    I have am having trouble with this line in my macro below. Range("J2:J" & LastRow).Value = "=IFERROR(VLOOKUP(H2," & LCase(sh.Name) & "_rate,3,FALSE),"""")" The code is supposed to change the named range in the formula based on the sheet name. I can't figure out why I am getting this error...
  2. T

    Add data to next empty row not working

    Hi Guys This code is what I am using to add Data recorded from a userform to the next empty row in a sheet It was working but now nothing is being added to the chosen sheet Do one of you amazing guys out there have any ideas why??? Private Sub cmbSave_Click() Dim LastRow As Long, ws As...
  3. A

    Userform multi page help

    Hi there. I have a userform with a multipage layout. the code I am using to pull the data from a single page is below. Is there a way I can use this on each page without having to have to rename all of the elements on each page and re run the code every time? Hope that makes sense? Private...
  4. J

    VBA TRIM Column

    Hi guys, can someone help to fix my macro? Thanks, Sub Trim_column() Dim LastRow As Long Dim Sht as Worksheet Set Sht = ActiveWorkbook.Sheets("DataBase") With Sht LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row .Range("A2:A" & LastRow).value =...
  5. C

    Macro - Adding new row with data from userform + formula

    Hi, I would like to create a macro where a new row will be inserted and the fields "name", "date_joined", and "Capital" are being pulled out from a userform (the code is also in the "command_button" of the said userform. This is quite easy. But...there are 4 other columns that contain purely...
  6. A

    Defining Cell Values from VBA UserForm

    Hi All, 1st time posting and its been over 10yrs since I've used my VBA skills so please accept my appolgise if I have rehashed anything in the forums but so far I've not found a solution. I've created a userform which is entering data into spreadsheet. I'm have some issues with defining the...
  7. Taul

    Looping through rows and then by columns

    Hi, I could do with some assistance please. I have data laid out as follows:- Headers in row 5 and Data in columns A to T (approx. 300 rows of data) Column A will always shave data in it, so I’m using that column to reference the “lastrow” Columns G to K will have company names (with some...
  8. gheyman

    Code based on condition of a Checkbox

    I have a checkbox1 I only want the code to run of the box is checked. (And have a message box if its not checked.) How do I put that If statement in? Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ' Dim LastRow As Long ' LastRow =...
  9. P

    Using Listbox selection to name worksheet

    Hi All I'm hoping this is simple. I have a userform that I want to copy data from to two worksheets. The first worksheet if fixes, the second worksheet is chosen from a userform list box selection. The listbox is populated with the names of the worksheets automatically so I know the sheet...
  10. R

    Convert Formula to VBA

    I have a UserForm that looks for a sheet where the sheet name equals a combo box value. Once that sheet is found, I want certain elements from the sheet to populate the form from a specific row, based on this formula. I'm having trouble inserting the code so that it finds the correct row. I...
  11. R

    Desperate to Find Error

    When I try to test this code, I'm getting an Error Type 13, but I haven't been able to find where there's a data mismatch. Thoughts? Option Explicit Dim coboDict As Object Private Sub cmd_Close_Click() Unload Me End Sub Private Sub cmd_Submit_Click() Dim ws1 As Worksheet Dim LastRow As...
  12. R

    Error Updating a Null Date to a Worksheet from a User Form

    I've built a User Form that will update a few different worksheets. I have a few date fields that won't always be populated, if the Client doesn't sign up for particular services. When I test the form, I'm getting an error because the date is null. I don't want to populate the field with...

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