Excel pop up message

BlackPanther

New Member
Joined
May 11, 2015
Messages
21
Hi all,

I need to create a pop up message for a whole column/ or A1 : A 60. if the value in B1 is greater than or equal to 100

I am new to VBA in excel
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Yes @
Caribeiro77
user-online.png
 
Upvote 0
Try:
Press ALT+F11
Insert module
And paste the bellow code ( you may have to change sheet name)

Code:
Sub findvaluegreaterigualto()


Dim findvalue As Range


Set findvalue = Sheet1.Range("A1:A60")


findvalue.Font.Color = vbBlack
findvalue.Interior.Color = xlNone


For Each cell In findvalue


    If cell.Value >= Range("B1") Then


      MsgBox ("You have values that exced value in cell B1")


        cell.Interior.Color = vbRed
        cell.Font.Color = vbWhite


    End If


Next cell


End Sub


After this you can craete a excel shape directly on the sheet and assign the macro..
 
Upvote 0
Caribeiro77
user-offline.png



I have a query , the code that you provided worked very well as per my need.

Just imagine the same scenario , but the column A is automatically filled by the computer . and we see the result after the execution . is there any code for such a scenario?


when i open the excel sheet the colums greater than or equal to 100 whould be highlighted. ( no pop up )
 
Upvote 0
but the column A is automatically filled by the computer

How does this happen's?
And is it all column A or just the same range of your post #1 (A1:A60)?

when i open the excel sheet the colums greater than or equal to 100 whould be highlighted

Which columns?
 
Upvote 0
column A , The code you provided works good .

But what i mean is , Column A will be entered automatically by the system during execution of a program.

Can we write a same code , but Cells greater than or equal to 100 will be highlithed when we open the excel sheet in advance
 
Upvote 0
Do you want that to happen only when you open the sheet or do you want that to happenwhen it hoppen's and also every time the b«numbers change( after the excecution of the program)?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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
Back
Top