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

Numbers validation

Yulechka

New Member
Hi excel gurus,

I am looking for your recommendation how the best reconcile/ validate data in the same report between tabs. I have report that using hlookup formulas pulling data from another tab on the same report. I need to add a column next it validating that hlookup is pulling the right number. I could use If formula to compare numbers between tabs, but looking for better approach to include an expense category and month. Thank you in advance!
 
Hi excel gurus,

I am looking for your recommendation how the best reconcile/ validate data in the same report between tabs. I have report that using hlookup formulas pulling data from another tab on the same report. I need to add a column next it validating that hlookup is pulling the right number. I could use If formula to compare numbers between tabs, but looking for better approach to include an expense category and month. Thank you in advance!
Hi,

I don't get the concept of this. Any formula that validates whether a formula is returning the correct value would; I guess, have to be a different formula written in a different way and if the data lends itself to errors then this formula too could return the wrong data.

Perhaps this would be easier to follow if we had a sample workbook.
 
Thanks Mike. You are right about a different formula written in a different way. I am attaching the sample file. The Totals tab pulls via vlookup formula from Income Stmnt tab certain categories. In my opinion, it might break at some point if I keep adding more years. What I am looking for is the formula that compare the $$$ on Totals tab to accounts the category name, i.e. Gross Profits, the correct $$$, i.e. 1,425 and correct year, i.e. 20x2. Basically, i want to account for all possible criteria to validate the number on Totals tab. Thank you again!
 

Attachments

  • Sample report.xlsx
    12.2 KB · Views: 1
Hi ,

The whole point behind using formulae in a workbook is that once they are set up correctly ( which means not that they give the correct results , which even erroneous formulae can , but that their logic is correct ) , they will continue to give the correct results all the time.

The only way in which things can go wrong is if the formulae have been written without considering all possible situations such as insertion of rows / columns , deletion of rows / columns , modification of row / column headers ,...

However , there is a point beyond which developing an absolutely fool-proof formula is impossible ; it is up to the user to exercise some amount of discipline.

To doubt a VLOOKUP formula is not correct ; instead see if you can understand all the situations in which it can fail and then see how best these situations can be taken care of.

A VLOOKUP formula takes a value which is to be looked up in a data range , and if it finds a match , returns the corresponding value from a different column in the same data range ; the matching can be done either exactly or approximately.

In your sample workbook , the value which is to be looked up is the text Gross Profits in cell A4 on the Totals tab. The data range in which this is being looked up is A3:C30 on the Income Stmnt tab. The value which is being returned if the VLOOKUP function finds a match is from the second and third columns , the second column containing data for 20X2 and the third column containing data for 20X1.

The only possible mixups that can occur are :

The text in cell A4 on the Totals tab does not match the text in column A on the Income Stmnt tab.

The columns on the Income Stmnt tab which refer to data for 20X2 and 20X1 are changed by inserting columns in between column A and columns B , C ; in this case , the formulae will return the wrong values , since the second and third columns which are being referenced may contain some other data , and not the data for 20X2 and 20X1.

The first situation cannot be rectified by any known formula , since if there is no match , data can never be retrieved.

The second situation can to some extent be taken care of by matching the column header to see if it contains 20X2 and 20X1 as the right-most 4 characters ; if you want , the formula can even consider 20X2 and 20X1 anywhere within the column headers.

If however someone were to delete the columns B or C altogether and then recreate the data elsewhere on the Income Stmnt tab , no formula will survive this mishap.

See your file for an alternative formula , which matches the right-most 4 characters of the column headers.

Narayan
 

Attachments

  • Sample report.xlsx
    14.9 KB · Views: 6
Back
Top