CodingHnnnnnnng Excel macro trouble

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Peter (BOUGHTONP)  
 To:  99% of gargoyles look like (MR_BASTARD)      
39930.4 In reply to 39930.3 
The bit where there's a letter at the start of every variable. It's not necessary and is a fucking stupid way of writing code (in any language).

Anyway, what I was saying was try this:
code:
Sub SearchNReplace1()
    Dim CurrentCell As Range

    For Each CurrentCell In Selection
        CurrentCell.Value = "XXX"
    Next
End Sub

(making sure you have a backup first, just in case)

If that doesn't work then you've got something small to work with, if it does work then add back lines to reproduce original behaviour until it breaks again.
0/0
 Reply   Quote More 

 From:  Dan (HERMAND)  
 To:  99% of gargoyles look like (MR_BASTARD)      
39930.5 In reply to 39930.1 
Can you post a snippet of your spreadsheet with fake data?
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)   
 To:  Dan (HERMAND)     
39930.6 In reply to 39930.5 
Thanks Dan, and Peter, but I decided that since this is just a means to an end I'd just work around it. I replaced the "=" and "/7" with blanks (just leaving the days) and then carried out the calculations in new columns referencing the cells. I can hide the old columns to make t look less crap.

bastard by name
bastard by nature

0/0
 Reply   Quote More 

Reply to All    
 

1–6

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats