1. C

    VBA copy LEFT function / formula down all cells in column

    Hi guys! Long time reader, first time poster. Getting very frustrated with my VBA so any help is appreciated. In my worksheet "Paste Data", I have a string of text in column G and need to use the LEFT formula to find and copy the text before the character " - " into column H. My VBA code...
  2. A

    Add entry at the end of a list with a UserForm

    Hi guys, I am trying to write a code within a userform which can be used to enter data on 3 columns. The columns are F, G, H and the row start from row 4. But when I try to run the code I get an object error on ActiveSheet.Cells(lastrow + 1, 6).Value = TextBox1.Value. I'm new to VBA so the...
  3. U

    Copy Range of Cells And Paste Until Last Row

    Hi guys i have a page in range A41:H74 and i want copy this page and paste until last row of excel sheet. does any vba code to do this?
  4. M

    Run macro on event

    Hi guys, I have the working code below, however when I try to added to run in a change event the Range with lastrow stops working, wondering if any of you can advice on what can I do? Sub field_change() Dim LastRow As Integer With ActiveSheet LastRow =...
  5. F

    Fill Uneven Records Across Columns

    Hi All, Could you please help me find a way to fill in the blank cells that should start from the LastRow + 1 in Col B and go until LastRow in Col C? At the moment the data is just being pasted over the lastrow in Col B. Loop in question is the last one, rest is just used to show more or less...
  6. R

    Finding Last Row/Column to Hide other Cells

    Hello, I am trying to finding the last row with a value. -I know how to do this typically by using "xlUp" but for some reason it is stopping at a cell that does not contain a value but just a change in color. -I am now trying to find a different way to go about this. Instead, I want to...
  7. E

    Formatting to last row

    I want to highlight cell b37 and until the last row (which might change) in order to format that range of data this is what i have so far, whereby i have declared at the very start of the code the following: Dim Lastrow as Long originally i had it as range("B37:B150").Select, but i had to...
  8. R

    Finding the last row that contains a value, of a column

    Hello, I am trying to select a cell in the last row that does not contain a 0. It is taking me to Row 54 but I want it to go to Row 37. The method I know is to go to a cell at the bottom of the sheet and "xlUp" so it will find the first value it finds. I want to do this but want to ignore all of...
  9. S

    Extend Selection from the Active cell to last Row i.e Non Blank cell in the same Column (having few blank cells )

    Hi , Actually I was trying to run the subroutine to select a Single Column from the Active cell and Drag the selection to the Last Row (The Single Column and Multiple Rows are having some blank cells which are to be skipped). The code below doesn't give the desired result I would appreciate if...
  10. D

    Clear contents down to last row but not header VBA

    Hi, I'm having a little problem. I'm trying to determine the last row based on any data in column J and then delete the contents of cells A2 to AZ* on that last row BUT if the sheet is blank apart from the header (ie the last row is 1), then I want it to stop as the code is deleting the column...
  11. P

    Excel VBA to Outlook Select Range lastRow

    Hey guys, I need for the code to stop copying at the lat line with data, but cant figure out how to code it. Pretty sure i need to use lastRow, but Im not sure how to replace the range. Sub Main() 'For Tips see: 'Don't forget to copy the...
  12. F

    Moving rows upwards ... one at a time

    Hi, I currently have some code that looks at data in row 2 of a worksheet. After pressing a button, the VBA pulls the information from the cells in that particular row, through to other cells in the workbook, it then automatically saves this info as a new document and then returns to the first...
  13. J

    VBA dynamic last row for multiple sheets

    Ok so I'm a bit frustrated with several failed attempts at this. I have a workbook with many worksheets. I have code to loop through each sheet (except one) and perform different calculations for certain rows. I then take those calculations and attempt to paste them 3 and 4 rows after the last...
  14. S

    Including LastRow within a formula

    Hi All, I have some code which creates a "score" line within my spreadsheet. I need this formula to change each time I run my macro, as the number of questions it relates to is variable. I have the formula: Range("B" & LastRow + 3).Value =...
  15. M

    database manager

    Hello, I explain my problem, I create a database manager, to use it is very simple, in the sheet BDD Chat you will find a button that opens the manager, once open you will find a combobox that lists the name of the lists, a listbox which lists the items within a list, 1 button add a list, 1...
  16. D

    VBA delete last row help

    Hello everyone. I am trying to piece meal my VBA where I need it to select all sheets in the workbook and delete the last row in each sheet. Each sheet has the same headers but varies in row so as long as it is the last row being deleted it will work. Any pointers would be greatly...
  17. P

    Using Lastrow

    I’m trying to learn to write a sub without having to continuously repeat the Range on every line of code by using the command Lastrow. Below is a simple example of a Range A1:H15. <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings>...
  18. D

    Autofill goes past Last Row, Last row identifies correct Row

    Hi I have done lots of Google searches and found nothing on this. Normally I can find an answer on Google, or force the code to do what I want by trying a different method. I have a VBA problem that is driving me nuts. I'm using End(xlUp) to find my last row. When I hover over Last row...
  19. H

    Excel VBA to rename filesname or folder

    Hi Any idea why this not working? :D Sub ChangeInFolder() Dim OldName As String Dim NewName As String Dim LastRow As Long Dim i As Long LastRow = Range("A65536").End(xlUp).Row For i = 1 To LastRow OldName = Range("A" & i).Value NewName = Range("C" & i).Value Name OldName As...
  20. A

    Setting data range and speeding up VBA code

    Hi, I have some simple VBA code which does not work the way I want. It's probably something simple. First, in the code LastRow = Cells(Rows.Count, "B").End(xlUp).Row I would like to start the row count at row B3 not row B1; tried several options but all returned errors. Sub Test2() Dim...

Watch MrExcel Video

This Week's Hot Topics

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
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 "".
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