Error Message

jp77

Board Regular
Joined
May 30, 2007
Messages
93
If any of cells in the entire area in Sheet1 is #N/A, I would like to display a message"Error!, Please Refresh Again"

Thank you!!! JP77
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
=IF(ISNA(A1), "Error!, Please Refresh Again", "")

Where A1 is the cell address
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Aye, That'll can be done but you need to give us more info. Post a shot of your sheet and cell address of you expected results.
 

jp77

Board Regular
Joined
May 30, 2007
Messages
93
HI again,

Every cells in the range ("E8:ZZ99") in Sheet 1 contains fomulars and if any one cell is #N/A, then a warning message would display. I guess I need a macro to scan every cells until it finds NA and display a warning message...

THANKS SO MUCH!!!!
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Code:
Sub count()
Dim c As Range
Dim my As Range
Set my = Range("E8:ZZ88")
For Each c In my
If IsError(c.Value) Then c.Value = "Error!, Please Refresh Again"
Next
End Sub

Change ranges to suit
 

jp77

Board Regular
Joined
May 30, 2007
Messages
93
I copied the code and change the range as you can see below but it resulted in Application.define or Object.defined error at the Set my = Sheets("Summary").Range("E8:ZZ88") line

Sub count()
Dim c As Range
Dim my As Range
Set my = Sheets("Summary").Range("E8:ZZ88")

For Each c In my
If IsError(c.Value) Then c.Value = "Error!, Please Refresh Again"
Next
End Sub
 

Forum statistics

Threads
1,181,056
Messages
5,927,864
Members
436,573
Latest member
CMR237

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top