Although I changed the range spelling, it is still failing there.
Main Topics
Browse All TopicsI'm a noob to VB. I have the following macro made. When running my macro, it gets stuck on this part of the line:
>For Each currCel In ActiveSheet.Rance("S1_Reso
Below is my macro code.
Sub Macro1()
Dim currCel As Range
Range("D1").Select
Selection.End(xlDown).Sele
For Each currCel In ActiveSheet.Rance("S1_Reso
If currCel.Value <> "" Or IsNotNumber Then
ActiveCell.Offset(0, -2).Range("A1").Select
If currCel.Value <> "" Then
ActiveCell.Offset(-1, 0).Range("A1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
End If
End If
Next
End Sub
I think it may be a stupid mistake that I'm not catching or my syntax is off.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi IceCubes,
This version of your code executes. I wasn't sure what IsNotNumber was--the syntax suggests a Public variable--but I changed it to a test on currCel. I also got rid of your selections.
Rather than try to guess your intent, it would be better if you described in words what the code was supposed to be doing.
Sub DFiller()
Dim currCel As Range
'Range("D1").Select
'Selection.End(xlDown).Sel
For Each currCel In ActiveSheet.Range("S1_Reso
If currCel.Value <> "" And Not IsNumeric(currCel) Then
'ActiveCell.Offset(0, -2).Select
If currCel.Value <> "" Then
ActiveCell.Offset(-1, 0).Copy
ActiveCell.Offset(1, 0).PasteSpecial
End If
End If
Next
End Sub
Cheers!
Brad
Column D contains resource Names or decimal values. However, I have S1_ResourceName which is identified as a column range in my sheet.
What I am trying to do is:
Scan S1_ResourceName.
If a cell in S1_ResourceName is an integer or blanc then skip it, Else
If it has alpha characters (ex: Doe, John) then move 2 cells to the left and 1 cell up and copy its value and paste in the current cell.
Tx
The following code tests each cell in S1_ResourceName. If the cell is not blank and does not contain a number, then its value is replaced by that two cells to the left and 1 row up. This is similar to Patrick's code, except it draws from a different column:
Sub DFiller()
Dim currCel As Range
For Each currCel In ActiveSheet.Range("S1_Reso
If currCel.Value <> "" And Not IsNumeric(currCel) Then currcel=currCel.Offset(-1,
Next
End Sub
Business Accounts
Answer for Membership
by: perezmPosted on 2005-08-03 at 14:21:39ID: 14593331
Hi IceCubes,
It looks like you misspelled range with rance.
Try this change and see if it works.
M Perez