• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can you explain why this will not work with 6 numbers

I have a Macro that takes several rows and moves them back to a desired row of my choice. For example, I can reset up to 100 rows back or 1 row, 2 rows, 3 rows whatever I decide. Lets say I have 5 numbers in row 2 columns IJKLN and I tell it to go back 1 row it will take all 5 numbers and move them to 3 IJKLN. The numbers also are tied to letters that say if the numbers are even or odd. For example 2 would be a E for Even 33 would be a O for Odd, 24 would be a E for even and so on. The question I have is can someone explain why this Macro would not work with 6 numbers? When I try this on another spreadsheet that has 6 numbers it does not work. It actually scrambles all the letters in any giving row. What I mean is lets say the 5 numbers are 12345 which would be OEOEO. It may move them down or another row and be EEEEE.


Thanks

Code:
Sub ClearEntries()

  [I3:J6,I11:J14,I19:J22,T3:U6,T11:U14,T19:U22,AE3:AF6,AE11:AF14,AE19:AF22,I29:J29,I32:J32,I35:J35,T29:U29,T32:U32,T35:U35,AE29,AF29,AE32:AF32,AE35:AF35].ClearContents

End Sub

Code:
Sub ResetBackToGame()

Dim d As Double: d = Application.WorksheetFunction.CountIf([i2:i101], "?")

Dim i As Integer: i = 50 - [q5]

  Application.ScreenUpdating = False

  [I2:O101].Copy Cells(3 + i - d, 9)

  Range("i2", Cells(2 + i, 15)) = "?"

  [i102:152].Clear: [q5].ClearContents

  Application.ScreenUpdating = True

End Sub
 
Last edited by a moderator:

3 points :

• Post question in VBA Macro forum, here is Excel formulas !

• Use code tags !

• Avoïd cross posting (Larbec in Excel Forum), at least warn and post link ‼
 
3 points :

• Post question in VBA Macro forum, here is Excel formulas !

• Use code tags !

• Avoïd cross posting (Larbec in Excel Forum), at least warn and post link ‼
Are you scolding me?

I will speak with my son about posting on other sites when I'm already dealing with one. He us just trying to help daddy I'm sure lol or think he is lol
 
Back
Top