2016年2月23日星期二

Troubleshooting:how to select a range of cells in vba and compare if all their value is equal to #N/A

how to select a range of cells in vba and compare if all their value is equal to #N/A

Hello
 
I am new to Macros so any help would be appreciated.
I have a sheet in my work book which displays the output.
the output is in the range D11 to M151.
I would like to display a message box saying "output not handled" when all the values in this range is
"#N/A"
 
Please help me its urgent

Solutions to the Problem how to select a range of cells in vba and compare if all their value is equal to #N/A

Download SmartPCFixer to Fix It (Free)

Try this:
 
Sub Alert()
    Dim rng1 As Range
    Dim rng2 As Range
    Dim rng3 As Range
    Set rng1 = Range("D11:M151")
    On Error Resume Next
    Set rng2 = rng1.SpecialCells(xlCellTypeFormulas, xlErrors)
    Set rng3 = rng1.SpecialCells(xlCellTypeConstants, xlErrors)
    If Not rng2 Is Nothing Then
        If Not rng3 Is Nothing Then
            Set rng2 = Union(rng2, rng3)
        End If
    ElseIf Not rng3 Is Nothing Then
        Set rng2 = rng3
    Else
        Exit Sub
    End If
    If rng1.Count = rng2.Count Then
        MsgBox "Output not handled!", vbInformation
    End If
End Sub

Tweak IE Options
  • Open Internet Explorer.
  • Go to "Tools > Internet Options > Advanced Tab".
  • Uncheck "Enable third-party browser extensions".
  • Click "Apply".
  • Reboot your computer.

Another Safe way to Repair the Problem: how to select a range of cells in vba and compare if all their value is equal to #N/A:

 

 

How to Fix how to select a range of cells in vba and compare if all their value is equal to #N/A with SmartPCFixer?

1. Download Error Fixer . Install it on your computer.  Click Scan, and it will perform a scan for your computer. The errors will be shown in the scan result.

2. After the scan is done, 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 removed. You can also use other functions in this software. Like dll downloading, windows updating and print spooler error repair.


Related: Startup Error Failed to connect to a Windows service System Event Notification Service sic Task Scheduler not always closing down program text wrap not working in Word Upgraded my computer from Windows Vista to Windows 7 Now my Lexmark Z515 printer will not work Can someone please help me The drivers for USB 2 0 arent showing up and dont seem to be usable I have ServicePack s 1 thru 3 The drivers used to show and work but not any more Is there a way I can get them back so my 2 0 items will work properly Symbols are not displayed in PDF when word is converted to pdf using Save As PDF Microsoft Addin The Security Center has not recorded an antivirus product when tried to generate System Health Report When conducting a search on Google or Bin search results are not visible I get a blank white page Ulead Photo Express 5 SE does not work with Win7 USB 2 0 devices plugged into USB 3 0 do NOT appear in Safely Remove HW VBA Excel find matching list files and copy to another folder What can I do to eliminate the not responding message I constantly get Web Proxy Not Responding USB Microsoft Mouse Not working upon boot whatsapp not connecting What should I do if my CD Drive reads some CDs but not others,Issues With Downloads And Installations Since Fresh Install Of Windows 7 64bit,Windows 8 - Browsers Font Rendering Issue! Blocky Fonts Text,Why Some Of Links Are Not Functioning In Web Pages (IE8)?,Internet Stops Working,Nesting Functions???,IMesh Is Not Working Only Minimizes,I Can't Uninstall ITunes And SupportSolutionsFramework.msi,I Have 3 Columns Out Of Many Columns Of Data Each With Hundreds Of Rows, I Need To Identify The Lowest Number In Each Row For These Three Columns Only And Reference The Column Title For That Particular Number.,Divide Information Into Two Columns,My Asus T100 Transformer Wont Turn On
Read More: hi if i am using a wirelesskeybord an need to turn on my wifi how do i do it? [Solved],How to Fix - How do i fix my windows 7, it keeps crashing with Blue screen along with BCCode: 1a?,[Anwsered] Decimal defiance,EMI BY NEW METHOD [Solved],Solution to Error: Windows 7 USB Drive with RAW partition.,Alps pointing device stops working and resumes.,Attempting to use Conditional Formating with a variable,internet options not opening on IE 10,cannot open my emails. they are there but will not open,Microsoft Works 9 does not keep History items.

没有评论:

发表评论

注意:只有此博客的成员才能发布评论。