rowcount

  1. I

    Using variables to reference workbook filenames

    Hi all, I've written some VBA which manipulates data in two existing workbooks, and am trying to add some extra functionality - but am struggling to get this to work using variables to replace hard coded filenames. Within the code I have the following: With extwbk.Sheets("Sheet1")...
  2. J

    Insert rows fails

    Hello: I've counted rows in file1 and want to insert 2.25 rows in file2. Everything is fine until row insert statement. I get the error: Insert method of range class failed. I've tried a ton of other iterations and can't get it to work. Any help would be greatly appreciated! Dim wb as...
  3. M

    Finding range of first empty cell in column and set as variable's range...

    I've listed my code below. I want to be able to set the first empty cell's range in a column equal to the range of variable "PasteCell". However, with my code, I get the error "Method 'Range' of object '_Global' failed when trying to msgbox the row location of PasteCell. Any ideas? Dim...
  4. S

    VBA help - Count number of found results in a list

    I have a list of phone numbers in the sheet "Data Load", column C starting from the 3rd row. I'm trying to go down one at a time searching for those numbers in the "Lookup" tab to find how many numbers have not yet been entered into the "Lookup" tab. I put in two fake numbers into the list as a...
  5. sharky12345

    Type Mismatch trying to find cell value

    I'm using this to try and identify which row a cell values appears on another sheet; Dim YourVariable As VariantDim rowCount As Integer Set YourVariable = Sheet21.Range("B2").Value With ActiveSheet.Range("A:A") Set uRng = .Find(YourVariable, , xlValues, xlWhole, , MatchCase:=False...
  6. D

    Save a excel form as multiple/batch files of PDF's

    I have vba code that works on another workbook, but for whatever reason it will not work on a new workbook when I inserted into new workbook. When the button is pressed to create the PDF's, the code will take a record number from a cell on the excel worksheet (I1) (ie. 12) where the form is...
  7. T

    Excel VBA to Delete Rows with Zeros, Type Mismatch Error

    For the code below, I get a type mismatch error on the line highlighted in red. The code runs down a defined column and when it finds a zero, deletes the entire row. What is the line missing? Initially it worked and then it stopped working. Option Explicit Sub CleanUp() Dim sh As Worksheet...
  8. I

    Trying to omit the first row of excel and creating csv of sheet 2 using command button. pls help me with the code.

    Private Sub CommandButton1_Click() Dim xWs As Worksheet Dim xcsvFile As String Dim rCell As Range Dim rRow As Range lFnum As Long Dim rowCount As Long For Each xWs In Application.ActiveWorkbook.Worksheets For Each rRow In ActiveWorkbook.UsedRange.Rows If rowCount > 1 Then For Each rCell In...
  9. L

    Grouping data by rows in vba

    I have a spreadsheet with over 6000 rows the size of which is dynamic. This is probably so simple but I cant work it out without every other time getting myself in a continuous loop. Excuse my poor coding but I do at least try :) The first few columns of each row may be identical but the...
  10. C

    Loop over columns, returning row numbers with empty cells

    Hello all. I am trying to compile a VBA-code that will go down a column, find an empty cell, write the row-number and continues. Once the first column is finished, it should 'jump' to the next column, until there are no more columns left. I did get the code working to write the empty cell...
  11. T

    VBA code to copy data to seperate sheet on successive rows of same sheet

    :confused: I am new at this but I feel that I have exhausted mysearch resources for my specific issue. I currently have a workbook with 5sheets. Sheets 1-4 have the exact same template but data within them maychange. Sheet 5 records specific data within each sheet with the click of amacro...
  12. T

    Using VBA to copy specific data from sheet1 to another sheet in successive order

    I am new to this and have exhausted my search resources. I have a workbook with 5 total sheets. 1-4 have an identical template with potentially varying data and sheet 5 captures this specific data in a row format. Sheets 1-4 all have their own VBA modules through a macro button. When I click the...
  13. J

    Trying To Delete Empty Rows From Table - Invalid Procedure Error

    Hell All: I have a worksheet that allows a user to input data. One of the options allows them to click a button and have additional rows added to the table. This part is working fine. However, when they click the button to export that data as a CSV file, it must remove any empty rows, so the...
  14. D

    VBA Code to process large amounts of data quickly

    I have a large set of data, about 50,000 rows by 25 columns. I need to filter down the data into 10 groups based on different criteria. I have tried 2 methods, both are taking the better part of 2 hours to complete. I am hoping someone can think of a faster way to do this. For the first...
  15. Eskypades

    Macro crashes on Mac but works on PC

    I have the following code in my worksheet (forgive the crude coding). It works just fine on my PC but when I send the worksheet to my client and he runs it on a Mac, it crashes Excel. The crash report is 48 pages long and includes the following error message: "Error Signature: Exception...
  16. J

    VBA - How to access range from sheet without activating

    Hi, I am using the following code to count the number of rows in a range. For some reason, it only works when I have the source sheet activated. I need it to work no matter what sheet you are on and bypass having to activate a specific sheet. The variable sheetname is a string with the name...
  17. J

    Export only filled cells to access

    I find an easy way to send data from excel sheet to access database with following VBA code : Sub SaveOnAccess() Dim NewCon As ADODB.Connection Set NewCon = New ADODB.Connection Dim Recordset As ADODB.Recordset Set Recordset = New ADODB.Recordset NewCon.Open...
  18. J

    VBA runtime error on rowcount

    Hi, My macro code for rowcount has started producing a runtime error (runtime error 1004: No cells were found). It's only just started flagging this error since the size of the datalog has grown to 430 rows. There obviously many thousands of rows blank below. Is there a way to have excel...
  19. J

    Rowcount only based on column A

    Hi there, I'm trying to rowcount a table, to find the first empty row. However, as some of the columns in the table have If statements, I'd like to rowcount based only on the contents of column A. That is, if column A is empty in that row, then consider that row empty. Here is the section of...
  20. S

    Row count base on one column

    Dear everyone, I have a macro which copies data to a main excel to the last unfilled row. The code is the following: Private Sub CommandButton1_Click() Dim dt As String Dim sc As String Worksheets("migrate").Select dt = Range("A2") sc = Range("B2") Set myData =...

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