• 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.

Data validation using excel macro

Dee

Member
Dear Experts,

In the attached table, i need to make data validation using macros. Fonts in RED color are the sum of rows and columns.
Requirement: whenever the inout is given in that particualr column or row the sume should not exceed the corresponding value in both rows and columns. If it exceeds it should give error.
I tried using data validation but not successful.
It should be dynamic enough to handle the addition of rows and columns.
Attached is the sample file.

Thanks for your help in advance.
Dee...
 

Attachments

  • Excel Help.xlsx
    10.7 KB · Views: 3
Hi Dee,

See the attached file. This is not a macro solution. Correct me If I did not understand your requirement.

Regards,
 

Attachments

  • Excel_Help(1).xlsx
    10.7 KB · Views: 4
hi,
I tried achieving this using data validation...but not succeded.
The requirement: $I$7 is the sum of $E$7 to $H$1
whatever the number we type in the range E7 & H1 should not exceed $I$7,if it exceeds it should give a error message.
Similarly $E$10 is the sum of $E$7 to $E$9. In this also the sum should not exceed $E$10.

this is applicable to all rows and all columns in the cell range of D6 to I10.

The input should not exceed both the rows total & column total.

Please advise,
Dee...
 
@Dee

I noticed that you had manually put the sum values. Will you put like that only or though SUM function?
Because if you put sum function the sum value will get adjusted as soon as you will enter values and data validation will not work.

Regards,
 
Back
Top