Thursday, March 31, 2016

Troubleshooter of Error: adding more than one IF parameter

adding more than one IF parameter

I have the following code in a module: 
 
The second IF statement says that if a cell (c.Offset(, 1) is empty, then cell c.Offset(, 9) is equal to c.Offset(, 8). 
 
I need to add a second IF statement (like maybe an ANDIF or something, which checks to see if cell c.Offset(, 2) is empty, and if it is not empty, then it doesn't set cell c.Offset(, 9) to c.Offset(, 8), but instead just leaves c.Offset(, 9) the way it is.
 
I really hope this makes sense.
 
Sub StrikeThrough()
Dim MyRange As Range, c As Range
Dim LastRow As Long
LastRow = Cells(Cells.Rows.Count, "c").End(xlUp).Row
Set MyRange = Range("c12:c" & LastRow)
For Each c In MyRange
If c.Offset(, 1) <> "" Then
    c.Offset(, 9) = 0
    c.Font.StrikeThrough = True
End If
If c.Offset(, 1) = "" Then
    c.Offset(, 9) = c.Offset(, 8)
    c.Font.StrikeThrough = False
End If
Next
End Sub

Solutions to the Problem adding more than one IF parameter

Download Error Fixer (Free)

Perhaps
 
Sub StrikeThrough()
    Dim MyRange As Range, c As Range
    Dim LastRow As Long
    LastRow = Cells(Cells.Rows.Count, "c").End(xlUp).Row
    Set MyRange = Range("c12:c" & LastRow)
    For Each c In MyRange
        If c.Offset(, 1) <> "" Then
            c.Offset(, 9) = 0
            c.Font.StrikeThrough = True
        ElseIf c.Offset(, 2) = "" Then
            c.Offset(, 9) = c.Offset(, 8)
            c.Font.StrikeThrough = False
        End If
    Next c
End Sub

Machine Throttling
  • Click the Start button.
  • In the Search box, type "regedit" (without quotes) and press Enter.
  • Look for the following registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\ SQMClient\Windows\DisabledSessions".
  • On the right window pane, delete the subkey: "Machine Throttling".
  • Restart your computer.

Another Safe way to Fix the Problem: adding more than one IF parameter:

How to Fix adding more than one IF parameter with SmartPCFixer?

1. You can Download Error Fixer here. Install it on your system. When you open SmartPCFixer, it will perform a scan.

2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.

3. The Repair part is finished, the speed of your computer will be much higher than before and the errors have been fixed. You can also use other functions in this software. Like dll downloading, windows updating and print spooler error repair.


Related: How to Fix - 64g ssd with a 500g regular drive?,Allow Unhide Rows in Protected Workbook [Solved],[Solved] Get in Excel 2007 data from Access 2007 out of self-built Queries,[Solution] How can I temporarily disable 'service manager' to install Adobe flashplayer?,[Anwsered] When I try to watch a flash video, I am told occasionally that I don't have Adobe Flash.,Solution to Error: Black screen during boot sequence,[Solved] Can't restore Windows 7 64-bit from external hard drive,How to Fix - IE 11 Enhance Protect Mode reset issue with add-on's?,Solution to Error: Internet Explorer 9 update/install error - Error Code 80092004,Upgrading to IE 8 causes cookies to get deleted when starting IE [Anwsered],Solution to Problem: All programs try to start from windows component
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,How to Fix Error - Getting an error "not connected to the internet" while trying to install Samsung Kies?
,How to Fix - Internet Explorer shuts down and reopens tab when attaching to email or uploading files.?
,Fast Solution to Problem: Sending Error Message
,[Anwsered] Thinkpad 8611 Boot,How to Resolve - Svchost Helper?,Fast Solution to Problem: L30 101 Driver Windows 7,Troubleshooter of Error: Io Device,How to Fix Error - Dell Laptop Code 39?
Read More: How to Resolve - Adjust line spacing in bullet list, Word 2007?,Troubleshooting:After everything working OK all of a sudden I can't open my documents or WORD, Power Point etc..seem to be either hidden somewhere or refusing to open ? Error,How Can You Fix - address bar history gone?,How to Fix - Adding a character to a line based on the existence of another character.?,Fast Solution to Problem: address bar.HOW DO i delete sites,a file called mDNSResponse.exe. is causing bonjour not to operate properly,what should I do?,A QUESTION USING THE "IF'S" Formula.,A continuos flashing window with which title is C:Windows\System32\cmd.exe, and has the following message: The syntax of the command is incorrect.,Acrobat compatibility issue and you tube problems____,ActiveX on IE 9 not loaded

No comments:

Post a Comment