Excel Run-Time Error 1004 No cells were found

Jnat2

New Member
Joined
Sep 25, 2008
Messages
9
This macro starts out looking for the first non blank cell by looking down about a hundred cells and then going back up till it finds the first non blank cell. When it finds the first non-blank cell it goes up 1 row and adds 1 to the number for the next row. It works fine the first time then, after the file is saved it will stop the macro with the following message; Run-time error ‘1004’ No cells were found. If I format the cells in question, the macro works again until I save the file, then it happens again.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p> </o:p>
Excel 2003 11.8220.8221 SP3
I think there is a hotfix for this but I can't get it to install. Is there a way around this?

This is the portion of the code that gets the error:

Range("A11:A100").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
ActiveCell.FormulaR1C1 = "=+R[-1]C+1"


Thanks
 
This works great. I just need to add the copy formulas in a couple of places so it adds the previous amounts, averages the values, etc.

Is there a way to put labels on the input boxes so you know what to enter?

Thanks for your help
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Yes, just change the single space in your inputbox statements to whatever you want the prompts to be.
 
Upvote 0
Rory, Sorry to bother you again. I thought it would be easy to insert the copy, paste, but its not. Where you have .Value, I need to copy the formula from above back to the current cell.

I tried my old stuff, didn't work.
thanks
 
Upvote 0
If it's formulas for all of them, try this:
Code:
   Dim rngNext As Range
   With Sheets("Smith_Ron")
      Set rngNext = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
   End With
   With rngNext
      .FormulaR1C1 = "=+R[-1]C+1"
      .Offset(0, 1).Value = InputBox(" ")
      .Offset(0, 2).Value = InputBox(" ")
      .Offset(0, 3).FormulaR1C1= .Offset(-1, 3).FormulaR1C1
      .Offset(0, 4).FormulaR1C1= .Offset(-1, 4).FormulaR1C1
      .Offset(0, 5).Value = InputBox(" ")
      .Offset(0, 6).FormulaR1C1= .Offset(-1, 6).FormulaR1C1
      .Offset(0, 7).Value = InputBox(" ")
   End With
   Application.Run "Golf2009.xls!SelectMenu"
   Application.Run "Golf2009.xls!Imput"
 
Upvote 0
It works great. It does exactly what I need. I appreciate everyone's help with this.

Thanks again
 
Upvote 0

Forum statistics

Threads
1,216,561
Messages
6,131,403
Members
449,650
Latest member
Adamd325

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