Msg Box for any cells greater then 1st cell in the row

markmeadows1

New Member
Joined
Apr 10, 2011
Messages
8
:confused:

ok if i have 5 rows

A1= 7
check the row b1:z1 and if any cell greater the cell A1 >7 return msg over limit
same for the rest of the rows
A2= 5
A3= 9
A4= 6
A5= 8

any help would be great :confused:
 
the code works but some days are over the limit which is aproved for one day but the code keeps picking it up then fails on new entries

so row 2 is already over the limit on one or two days

row 8 is not over the limit but if i make it go over it shows that row 2 is over which it is but doesnt show that row 8 is also now over



i thought this might be a pain its driving me crazy

thanks for your help ive been fighting this for what seems a life time
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi Mark

Try this.

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Calculate()<br>  rcount = ""<br>  <SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> 5<br>    <SPAN style="color:#00007F">If</SPAN> WorksheetFunction.Max(Range("B" & i & ":Z" & i)) _<br>      > Range("A" & i) <SPAN style="color:#00007F">Then</SPAN> rcount = rcount & i & ", "<br>  <SPAN style="color:#00007F">Next</SPAN> i<br>    <SPAN style="color:#00007F">If</SPAN> rcount <> "" <SPAN style="color:#00007F">Then</SPAN> MsgBox "Rows(s) " & rcount & "Over Limit"<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0
Upvote 0
your right mate i wasnt thinking just needed a fresh set of eyes

i will set up a new team called over the limit and and book them as X with a 100 limit i will change the message to Over Limit book as aproved over managers aproval reqiured

thanks for your help mate

are you any go with vlookups lol
look for all X and report names and the dates for a report page lol

youve been a great help

BIG thanks
mark
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,794
Members
449,468
Latest member
AGreen17

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