runtime 1004

  1. N

    Using VBA to insert formulas

    Hi all, I'm trying to use VBA to insert the formula below into a cell but I always get a runtime error 1004. Sub Fill_Formulas() ThisWorkbook.Worksheets(4).Range("D2").Formula = "=IFERROR(VLOOKUP($A$2;'[Daily Tracker.xlsx]Info'!$A:$I;2;FALSE);"")" End Sub What am I doing wrong...
  2. 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...
  3. H

    Runtime error 1004 CONCATENATE

    Hello, I would like to have a space between two cells N2 and O2. The " is a delimiter (right?). What is a workable option to use? Very much appreciated! Range("P2:P" & LastRow).Formula = "=CONCATENATE(N2, "", O2)" Hans Grandia The Ne
  4. S

    Run Time Error

    Hello, I keep getting this error: Run-Time error '1004': Method 'Range' of object '_Global'failed Help? The error pops up on the line in red. Dim DataRng As Range Dim c As Range Application.ScreenUpdating = False 'Delete out unneeded columns Columns("A:F").Select Selection.Delete...
  5. S

    Loop using Autofilter stops randomly after some successful iterations

    Hello everybody, I'm quite new to VBA and have now encountered a problem which I couldn't google my way out of. Maybe someone here as an idea. So my goal is the following: I have a worksheet with data in it. For every column of data, I want to calculate the average of the Bottom 25% / Top 25%...
  6. C

    VBA Delete Cells (Delete Shift:=xlUp)

    Hi I've written some code to determine whether I need to delete or insert cells in to spreadsheet (depending on whether I have more or less data than the last time the code was run). If the sheet I'm deleting the cells from is active then the code runs fine. However, the sheet won't normally...
  7. J

    Setting formula for a Range is throwing an error

    Good morning - Can anyone provide some thoughts on why the following line would throw a "Run-time error '1004': Application-defined or object-defined error" message? Range("K5:K" & DestRow).FormulaR1C1 = "=VLOOKUP(RC1&RC2&RC3&RC6,'Custodian Data'C1:C13,9,FALSE)" It must be something with the...
  8. T

    Runtime error 1004 when using .Formula

    Hi - I'm trying to insert a formula using vba, which I thought would be fairly simple. The code I have used is: Range("H573").Formula = "=IFERROR(IF(SUMIF(C_datadump!$B$23884:$B$24191,I_control!$F573,C_datadump!BG$23884:BG$24191)=1,1,0),"")" However I am receiving runtime error 1004. I've...
  9. B

    MS Excel 2013 Macro Runtime Error 1004 on Formula FillDown

    I am failing to find how to make this new macro run smoothly in other worksheets. The code fails when I copy down the clean formula to the bottom of the column (underlined and in Italic below). I have gone through the forum and sorry, but I am not seeing a solution to work. Thanks for any clues...
  10. E

    Runtime error 1004 again.

    I'm getting the following run time error on the following code in bold: Sub Capitalise(rngToConvert As Range) Dim rng As Range For Each rng In rngToConvert With rng If Not .HasFormula Then .Value = UCase(.Value) End With Next rng End Sub Sub...
  11. T

    VBA - Issues opening workbook with .xls extension but was saved from html

    Hello, I have a macro built to open a "source" workbook, copy and paste a range into a "master" workbook. The "source" file has the .xls extension, but when you open it you get the warning that its in a different format. Below is my code - its works fine if I have recently opened the "source"...
  12. J

    VBA Run time error when counting blank cells

    Dim tbl As Range Set tbl = ws.Range("Table1") Dim archive As Worksheet Set archive = ThisWorkbook.Sheets("Sheet1") Dim rng As Range Set rng = tbl.SpecialCells(xlCellTypeBlanks)If rng.Cells.Count <> tbl.Cells.Count Then 'do stuff End If I'm not sure why, but I...
  13. D

    why is cell.address working for x<200 else giving runtime error

    The following code <code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Dim YrColNumber As Integer Dim...
  14. N

    Trying to Replace a Combo Box with a List Box (Form Control) in Excel Worksheet

    Hello, I'm working with an excel worksheet with macros and there are several Combo Boxes (Form Control) on one worksheet. Most of these Combo Boxes have only 2 items to choose from so I thought it would be nicer to have List Boxes to replace them. I started by trying to replace just one combo...
  15. R

    VBA Excel 2010 Run-time Error 1004 - Application-defined or Object-defined Error

    Hi, I am a new analyst working on a Macro-enabled worksheet. I ran into some rather popular run-time error while trying to run my macros (i.e., create, delete) multiple times on the same worksheet. I research on the internet and found that the error occurred because my object/variable has not...
  16. D

    Run time error on simple Macro that was working an hour ago

    Hi everyone, I had this macro running fine and I wanted to do some additions to it and then it gave me the 1004 run time error. So I deleted all the extra and went back to this, which is the original (Previously working!) code but I still get the same error Is there something that I could...
  17. dmqueen

    VBA Application Defined Error 1004

    I've been slowly making progress, and learning a lot! The size of my file (47 MB)! had something to do with it, got the go ahead to clear out the old data and was able to trim it to 33 MB. Now my computer doesn't lock up every time I us the file :). Still having run time errors. Now it's dying...
  18. C

    run-time error '1004' when sheet is protected

    Can you tell me what's wrong with my codes? I have macros on my other protected sheets and they are working fine. I have summary sheet named Index positioned at the very last and that's where I am getting the error whenever I protect it. Here are the codes: Private Sub Worksheet_Activate() Dim...
  19. D

    Runtime 1004 Error with code that seemed to be working... Help!

    Hi, I'm new to macros and don't understand why code that seemed to be working stopped after I'd saved the file and opened it up again an hour or so later without having made any changes to it... I'm trying to get a .pdf file of a specific print area run from a macro and for the file to be...
  20. L

    Error Handling - Runtime Error 1004

    Hi, I am wanting to use error handling in some code i have written but am unsure of how to do so. Basically I am importing webpages into excel using the unique numbers associated at the end of the webaddress. When it is trying to import a webpage with a number that doesn't exist I get Run-time...

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