lastrow

  1. S

    Copy Macro Code from 1 Workbook to Another

    Hi All, I recently created a number of files for different departments - it has since been identified that one of the macros within these spreadsheets is slightly wrong and needs amending. The NEW macro is as follows; Sub AddLinesActionPlan() Dim LastRow As Long Range("B7:K26").Copy...
  2. F

    Dynamic Range For top and bottom

    Hello, I'm trying to autofill some cells but I do not want to autofill from the top of the column I need to only fill from the first empty cell in column C down to the last used cell in column A. I've tried several different iterations the following is currently what I've attempted but it is...
  3. T

    Copying table rows between tables based on criteria

    Hi all, been pulling my hair out for the last couple of hours trying to resolve this, and researching online and cannot seem to find anything that works) What i am looking for: Copy a row of information from one table to another (From table 2 on sheet 2, to table 3 on sheet 3) Note: i only...
  4. 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...
  5. P

    VBA For Deleting Previously Cut Rows

    Helo All, I've got a basic code that copy or cuts data from Sheet1("Inventory") to either Sheet2("Low") or Sheet3("Out of Service"). I'm not certain on how to create a code that deletes the previously cut data form Sheet1("Inventory") list. Thanks in advance for the help. My inputs are very...
  6. R

    VBA - Cut from one sheet paste on another, "Cut method of Range class failed"

    Hello all. Having this issue now. I was using a standard "Lastrow" declaration but it was putting to the bottom of the table range. Instead I need "Lastrow" to hold the bottom of the active cells in data, and then paste the cut line below it so it appends the table. Set F =...
  7. R

    copy Visible columns from A to U the last row

    Dim wb As Workbook Dim sht As Worksheet Dim LastRow As Long Dim destwb As Workbook Dim destsht As Worksheet Dim destLR As Long Dim rng As Range Set wb = ThisWorkbook Set sht = wb.Sheets("Open PO Raw Data") Set destwb = Workbooks.Open("C:\Users\name\Desktop\ALL PO RAW DATA 1-18 to...
  8. J

    Macro to split sheet into multiple CSV files with 1000 lines

    I'm trying to create a macro that will take the current sheet and split it into multiple CSV files, batched at 1000 lines each. The below code is what I have. It's saving the files but each file contains the same data (row 2 to row 1001). I need each file to be a batch of the whole set of data...
  9. D

    syntax help

    I have a spreadsheet that is populated from another sheet. Here is a screen shot of it https://www.screencast.com/t/6YANfjeXWzov. As each line is entered and copied across, the code places the new line under the previous line. What is the vba code to enter a formula in columns H and I for each...
  10. S

    VBA - Data Entry Sheet

    I have a workbook with 4 sheets. The "Input Sheet" has data made to resemble a Userform (Cells B4,B6,&B8 have descriptions and cells C4,C6,&C8 have bank cells for data input). Sheet1, Sheet2, & Sheet3 are all the same with A1,B1,&C1 containing the headers laid out in the Input Sheet...
  11. D

    Can I get some help with vba code please?

    I have a spreadsheet that allows input of costings. I then have buttons to copy the to other sheets according on the date. It needs to be copied to a monthly sheet and a sheet that contains every costing. There is quite a few cells that must have data put into them to arrive at a price. The...
  12. A

    IF statement is not working

    Hi All, Can anyone help me out on below code. I have to update final rating in column D. following is the sequence if Column has rating then update in column d, else copy rating from column b & if column a & b does not have rating the copy rating from column c <colgroup><col width="64"...
  13. N

    VBA to Setup Pivot Tables Not Working

    Hi, I have VBA code that sets up a pivot table, but for some reason my range is not selecting properly. It is supposed to select the range starting in cell A1 to last column and last row. But instead it is selecting A:AS. Here is the code. The part that is not working properly is...
  14. A

    VBA not recognising numbers

    Good Afternoon, i am using this code to search anything listed in Column A which seems to work fine however if i write a number and not text it breaks can anyone hel. Sub XMLHTTP1() Dim url As String, i As Long, lastRow As Long Dim XMLHTTP As Object, html As New...
  15. A

    Macro to fill down formulas when new data is entered

    I've been playing around with trying to get my sheet to fill down three formulas to the last row every time a new entry is added in Column A. And I want to do it without having to manually run the macro. This is the code I've been playing with Private Sub Worksheet_Activate() Dim LastRow As...
  16. N

    With Range and AutoFill Question

    Hi, I have a simple with formula but it's not copying down correctly. Sheets("WOs (DSP Only)").Select With Worksheets("WOs (DSP Only)") With .Range("A2:A" & Lastrow) .Formula = "=L2&""-""&K2&""-""&Z2&""-""&X2" End With With .Range("B2:B" & Lastrow) .FormulaArray =...
  17. L

    Optimization question

    Hey guys, im working on a big amount of data, and my initial step is to clear all the useless rows, what i describe as useless: if cell (M+rowNr) does not start with 25 26 or 27 So my code looks like this: Sub DataCleanUp() Dim counter1 As Integer, lastrow As Integer lastrow =...
  18. O

    Using a Loop to Assign and Complain Variables in an Array

    Hey, I'm writing a program in vba for work that I want to take the data from each row in columns a and b, then combine that information into a string variable that's part of an array, then check to see whether that same combination appears again. At the moment I'm having trouble with creating...
  19. M

    VBA – Repeat SUMIFS Formula for Unique Combinations of Rows

    Hello everyone. I am a VBA beginner. I need your help to solve my problem. Suppose that I have an Excel table with the following fields: D: Account L: Amount M: Category N: Value Day What I need to do is the following: Compute the conditional sums of the amounts by all possible unique...
  20. R

    VBA - Fill in empty cells to last row based on adjoining column's last row

    I have the following two types of code below and can't figure out how to combine correctly. What I'm trying to do is fill in blank cells in a column, and I don't want to have to name a range (J1:J3000), instead I want it to go to the last row based on a different column. Any assistance would...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top