Google-sheets – Use sumproduct to produce text with row and column reference in Google Sheets

google sheets

Is there a way to extract the text comment in the error produced by sumproduct in the following sheet? I expect C9 and C10 to be "Comment1" and "Comment2". This appears in the error message. Either a direct way to get the desired text or to extract the text from the error message using some JavaScript will be fine.

Here is the test sheet.

https://docs.google.com/spreadsheets/d/1aq4afUw29CxdOM4Yp9dgZw2wdJto8H343YMTJLXG-qM/edit?usp=sharing

enter image description here

Best Answer

Error occurs as you are trying to multiply text values. If you need to get respective data from Comment column use following INDEX and MATCH formulas.

=INDEX($A$1:$H$6,MATCH($B9,$A$1:$A$6,0),MATCH(C$8,$A$1:$H$1,0))

See results in D9 and D10 cells in your test sheet.