• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to prompt up userform when cell is different color

Choong

New Member
I have one question on how to prompt up a userform when the result is in red color.
Attached together is example of the excel file.
 

Attachments

Welcome to Chandoo.org.

Right click on the sheet tab and choose "View Code". And then paste the following code.
Code:
Private Sub Worksheet_Calculate()
  If Range("B4").Value < Range("B5").Value Then
  UserForm1.Show
  End If
End Sub
 
Hi Shrivallabha,
Thanks a lotz!!!! Really help me a lots. is this applicable for the 1 weeks data?
Really appreciated Shrivallabha....Thanks a lot....
 
Hi Shri,
I manage to solve the question just now. Now is to validate the next rules. For example after verified the Sales, then it will called up the userform and add into "Sales" sheet. Then, it will go to next item to check which is Profit. The same checking for Profit. And when input the data in userform, it will save in the Profit sheet. 2 questions :
1. From Sales to go to Profit to check.
2. Then save in different sheet.
Thanks in advance.
 

Attachments

Questions:
Only the red-marked entries or all of the entries in Row 4 of Sheet1?
Do you intend to keep it weekly or you will go on adding data horizontally?

Suggestion:
I would recommend including Dates in the DB sheets. If someone changes the record twice or thrice you will end up having as many entries without any trace.

Or at least then you can define what should be the action if any entry already exists.
 
I could not get back to you earlier as I did not get sufficient time to work something out.

Here is basic outline. I have modified the form somewhat. I have commented in the code so as to explain what I have tried to do. You can change it as you like!

There are three labels at the top which show the current data for which the data entry is to be made. The entry will not be made to DB sheets unless all 4 textbox entries are made. As soon as the entry is made, the code will check for the next entry and it will keep looping through all data until you finish. The form will not close.

I hope this is sufficient to give you a starting point :)
 

Attachments

Back
Top