|Your question is confusing.|
You say that you want "to display the total number of that value for each row " which sounds like you would want 5 for Row 1, 10 for Row 2, etc.
It looks to me like "the total from row 1 & 2" should be 15, not 2.
Are you really just asking for the total number of rows in which the value appears, regardless of how many times it appears in a given row? That's the only way I can see a result of "2" based on your example.
We also need to know some other information.
When you say "extract details of a value from an excel db" do you mean an Excel workbook, i.e. a .xls file? Is this a separate file from results.xls or just another worksheet in the same file?
Where in results.xls do you want the information placed?
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.