SOLVED

Formula for using integral values in a chart, blank spaces, and looking for overall concordance.

%3CLINGO-SUB%20id%3D%22lingo-sub-3107353%22%20slang%3D%22en-US%22%3EFormula%20for%20using%20integral%20values%20in%20a%20chart%2C%20blank%20spaces%2C%20and%20looking%20for%20overall%20concordance.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3107353%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20been%20working%20on%20this%20for%20days%2C%20and%20still%20have%20not%20been%20able%20to%20figure%20this%20out.%26nbsp%3B%20I%20am%20definitely%20not%20an%20Excel%20expert.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20difficulty%20with%20coming%20up%20with%20the%20Concordance%20values.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20blank%20spaces%20in%20either%20the%20ER%20or%20PR%20columns%20which%20I%20need%20to%20ignore%20in%20the%20calculation%20of%20the%20concordance.%26nbsp%3B%20(Usually%2C%20I%20end%20up%20having%20too%20many%20zeros%20in%20the%20concordance%20column.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20when%20the%20ER%20or%20PR%20values%20are%20%26lt%3B1%20%2C%20it%20is%20hard%20for%20me%20to%20figure%20out%20how%20to%20handle%20these%20numbers%20and%20still%20end%20up%20with%20the%20appropriate%20value%20in%20the%20Concordance%20column.%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22275%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%3CSTRONG%3EER(%25)%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%3CSTRONG%3EPR(%25)%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E%3CSTRONG%3EER%2FPR%20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EConcordance%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E1%3DYes%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E0%3DNo%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E99%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E82%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E1%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E96%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E86%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E1%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E95%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E9%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E1%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%26lt%3B1%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E4%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E1%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E95%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E1%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2260%22%3E%3CP%3E100%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%3CP%3E%26lt%3B1%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%22153%22%3E%3CP%3E0%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20then%2C%20finally%2C%20i%20need%20to%20calculate%20the%20overall%20percentage%20concordance%E2%80%A6..%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%206%2F8%20x%20100%20%3D%2075%25%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much.%26nbsp%3B%20I%20really%20appreciate%20it.%3C%2FP%3E%3CP%3ESincerely%20yours%2C%26nbsp%3B%3C%2FP%3E%3CP%3ESteve%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3107353%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3107371%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20for%20using%20integral%20values%20in%20a%20chart%2C%20blank%20spaces%2C%20and%20looking%20for%20overall%20concordance.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3107371%22%20slang%3D%22en-US%22%3EOops....the%20overall%20concordance%20above%20should%20be%205%2F8%20x%20100%20%3D%2062.5%25%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3109148%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20for%20using%20integral%20values%20in%20a%20chart%2C%20blank%20spaces%2C%20and%20looking%20for%20overall%20concordance.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3109148%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1295230%22%20target%3D%22_blank%22%3E%40SEAK1%3C%2FA%3E%26nbsp%3BI%20had%20to%20Google%20for%26nbsp%3B%3CSTRONG%3EER%25%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EPR%25%3C%2FSTRONG%3E%20in%20combination%20with%20%3CSTRONG%3Econcordance%3C%2FSTRONG%3E%20and%20understand%20that%20you%20are%20dealing%20with%20comparing%20two%20hormone%20levels%20relating%20to%20breast%20cancer%20research%20and%20that%20you%20need%20to%20determine%20a%20degree%20of%20correlation%20between%20the%20two.%20Forgive%20me%20for%20my%20non-medical%20interpretation%20of%20this%20Excel%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20blanks%20can%20be%20ignored%20by%20using%2C%20for%20instance%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(A2%3D%22%22%2C%22%22%2C%3C%2FSTRONG%3E%3CFONT%20color%3D%22%23DF0000%22%3E%3CCALCULATION%3E%3C%2FCALCULATION%3E%3C%2FFONT%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%2C%20where%20the%20%3CCALCULATION%3E%20bit%20would%20contain%20the%20formula%20for%20concordance%20in%20cases%20where%20A1%20in%20%3CSTRONG%3Enot%20empty.%3C%2FSTRONG%3E%26nbsp%3BOr%20perhaps%20you%20should%20just%20not%20have%20empty%20rows.%20All%20that%20is%20left%20is%20for%20you%20to%20explain%20the%20end%20result%20should%20be%20%22Yes%22%20and%20when%20%22No%22.%3C%2FCALCULATION%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20regard%20to%20values%20less%20than%201%2C%20i.e.%20%22%26lt%3B1%22%2C%20how%20do%20these%20relate%20to%20zero%3F%20Since%20zero%20is%20also%20less%20than%201.%20Or%20does%20it%20mean%20that%20zero%20means%20%22nothing%20at%20all%22%20and%20%22%26lt%3B1%22%20means%20%22something%20but%20just%20very%20little%22.%20If%20so%2C%20then%20get%20rid%20of%20the%20%26lt%3B-sign%20and%20use%20e.g.%200.5%20which%20is%20a%20number%20half%20way%20between%200%20and%201.%20That%20will%20at%20least%20enable%20you%20to%20use%20it%20in%20a%20calculation%20straight-away.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20the%20overall%20%22score%22%2C%20you%20could%20use%20something%20like%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DSUM(C2%3AC13)%2FCOUNT(C2%3AC13)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20format%20the%20cell%20as%20a%20percentage.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3115013%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20for%20using%20integral%20values%20in%20a%20chart%2C%20blank%20spaces%2C%20and%20looking%20for%20overall%20concordance.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3115013%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Riny%2C%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20your%20very%20prompt%20and%20kind%20reply!%26nbsp%3B%20%26nbsp%3BThe%20formula%20you%20suggested%20to%20calculate%20the%20%22concordance%20score%22%20is%20very%20helpful.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20regards%20to%20your%20question%2C%20we%20are%20looking%20at%20breast%20tumor%20percentage%20nuclear%20ER%20and%20PR%20reactivity%20in%20tissue%20biopsies.%26nbsp%3B%20The%20cutoff%20of%201%25%20is%20positive.%26nbsp%3B%26nbsp%3B%3CSPAN%3EWhen%20a%20patient%20has%20%26lt%3B1%25%20expression%2C%20we%20are%20saying%20that%20only%20rare%20tumor%20cells%20are%20positive%2C%20but%20since%20the%20value%20is%20less%20than%201%25%20of%20the%20area%20examined%2C%20it%20is%20reported%20out%20as%20being%20Negative.%26nbsp%3B%20%26nbsp%3B%20In%20contrast%2C%20when%20tumors%20are%201-100%25%2C%20they%20are%20considered%20positive.%26nbsp%3B%20I%20was%20wondering%20if%20there%20was%20a%20way%20to%20write%20a%20formula%20so%20the%20concordance%20can%20be%20determined%20by%20Excel.%26nbsp%3B%20Something%20like....%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EA1%20is%20the%20ER%20column%2C%20and%20A2%20is%20the%20PR%20column.%26nbsp%3B%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(A1%26gt%3B%3D1%20and%20A2%26gt%3B%3D1%2C%20IF(A1%3D0%20and%20A2%20%3D%200%2C%20IF(A2%26lt%3B1%20and%20A2%26lt%3B1)))%2C%20%22Yes%22%2C%20%22No%22%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20that%20did%20not%20work.%26nbsp%3B%20Any%20suggestions%20would%20be%20really%20appreciated.%26nbsp%3B%20Thank%20you%20Riny!%3C%2FP%3E%3CP%3ESincerely%20yours%2C%3C%2FP%3E%3CP%3ESteve%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

I have been working on this for days, and still have not been able to figure this out.  I am definitely not an Excel expert.

 

I have difficulty with coming up with the Concordance values. 

 

There are blank spaces in either the ER or PR columns which I need to ignore in the calculation of the concordance.  (Usually, I end up having too many zeros in the concordance column.)

 

Also, when the ER or PR values are <1 , it is hard for me to figure out how to handle these numbers and still end up with the appropriate value in the Concordance column. 

ER(%)

PR(%)

ER/PR

Concordance

1=Yes

0=No

99

82

1

96

86

1

 

 

 

 

 

 

95

9

1

<1

4

0

 

 

 

0

0

1

95

0

0

0

0

1

 

 

 

100

<1

0

 

And then, finally, i need to calculate the overall percentage concordance…..       6/8 x 100 = 75%

 

Thank you so much.  I really appreciate it.

Sincerely yours, 

Steve

 

 

11 Replies
Oops....the overall concordance above should be 5/8 x 100 = 62.5%

@SEAK1 I had to Google for ER% and PR% in combination with concordance and understand that you are dealing with comparing two hormone levels relating to breast cancer research and that you need to determine a degree of correlation between the two. Forgive me for my non-medical interpretation of this Excel problem.

 

The blanks can be ignored by using, for instance:

=IF(A2="","",<calculation>), where the <calculation> bit would contain the formula for concordance in cases where A1 in not empty. Or perhaps you should just not have empty rows. All that is left is for you to explain the end result should be "Yes" and when "No".

 

With regard to values less than 1, i.e. "<1", how do these relate to zero? Since zero is also less than 1. Or does it mean that zero means "nothing at all" and "<1" means "something but just very little". If so, then get rid of the <-sign and use e.g. 0.5 which is a number half way between 0 and 1. That will at least enable you to use it in a calculation straight-away.

 

For the overall "score", you could use something like:

 

=SUM(C2:C13)/COUNT(C2:C13)

 

and format the cell as a percentage.

@Riny_van_Eekelen 

Hi Riny,

Thank you so much for your very prompt and kind reply!   The formula you suggested to calculate the "concordance score" is very helpful. 

 

With regards to your question, we are looking at breast tumor percentage nuclear ER and PR reactivity in tissue biopsies.  The cutoff of 1% is positive.  When a patient has <1% expression, we are saying that only rare tumor cells are positive, but since the value is less than 1% of the area examined, it is reported out as being Negative.    In contrast, when tumors are 1-100%, they are considered positive.  I was wondering if there was a way to write a formula so the concordance can be determined by Excel.  Something like....

A1 is the ER column, and A2 is the PR column.   

 

=IF(A1>=1 and A2>=1, IF(A1=0 and A2 = 0, IF(A2<1 and A2<1))), "Yes", "No"  

 

but that did not work.  Any suggestions would be really appreciated.  Thank you Riny!

Sincerely yours,

Steve

@SEAK1 You have me confused now, but that may just be Excel terminology. A1 is the cell in the first column (A) on the first row (1). Thus A2 is the cell directly below it. I assume that the pairs you want to examine are on the same row. ER% from A1 and EP% from B1. Correct?

 

With regard to the concordance formula I'm still not sure about the logic. Let's not talk about cell references, but say it in words. This is what I think your example is saying:

  • If both ER and EP are greater than 1, then Yes.
  • If either one of ER or EP are less than 1 (and that includes zero), then No.

but if both ER and EP are zero your schedules suggests a Yes. That I don't get. Perhaps I'm just slow. Sorry. Perhaps you can clarify that bit and correct me where I go wrong.

 

 

Hi Riny, 

Sorry about that.  You are absolutely correct, it is much better for me to say it in text. 

 

-- If both ER and PR are greater than or equal to 1, then “Yes” Concordance.

-- If both ER and PR are less than 1 (including zero), then “Yes” Concordance.

-- If ER greater or equal to 1, and PR < 1 (including zero), then “No” Concordance.   

-- If ER < 1 (including zero), and PR greater or equal to 1, then “No” Concordance.   

-- If “Blank” space, then leave “blank” space in the Concordance column. 

--Finally, calculate the overall Concordance at the bottom of the third column…..

Number of “Yes” divided by total number of “Yes” and No”, and express as a “percentage Overall Concordance”. 

 

I hope this helps.  Again, Riny, I really appreciate your kindness in helping me with this.

Best Regards,

Steve

 

best response confirmed by SEAK1 (Occasional Contributor)
Solution

@SEAK1 See if the attached file has everything as it should be. If not, let me know.

Hi Riny,
Your formula worked perfectly and gave me the results I needed! There is no way I would have been able to figure it out with your help! I really appreciate it! If I can help you in any way, please feel free to contact me. Thank you again!
Best Regards,
Steve

@Riny_van_Eekelen 

Age

ER  (%)

PR  (%)

ER/PR Concordance

  

81

99

82

Yes

  

78

96

86

Yes

  

73

    

 

68

    

 

64

95

9

Yes

 

 

73

97

44

Yes

 

 

71

     

59

0

0

Yes

  

46

0

79

Yes

  

75

99

99

Yes

  

52

99

0

No

  

 

 Hi Riny,

 

I hope all is well.  I am so sorry to bother you, but may I please ask you follow-up questions in order to obtain some other data that we need.

 

--Assuming my chart goes from line 4 to line 10,000, how can I calculate the percentage of “Yes” in the ER/PR concordance for all these 10,000 lines? 

Only the Yes’s and No’s should be in the calculation, and skipping the blank spaces (where no ER/PR testing was performed.)

Most will certainly be “blank or empty” spaces but I wanted to have the flexibility for future testing.

 In the example above, it should be 87.5%.  (7 Yes / 8 Yes + No)

 

--Finally, if a woman is < 65 years old, how can we calculate the percentage of “ER Negative cases” (where ER % is <1 by definition) from line 4 up to line 10,000 ?   

(ER Positive cases would be when ER > 1 ).  In the example above, it should be  25%  (  2 / 8  ). 

I am having data from line 4 up to line 10,000 to accommodate future testing.  

 

Thank you kindly Riny.  I really appreciate it.

Sincerely yours, 

Steve

@SEAK1 No problem. See attached.

@Riny_van_Eekelen 

 

Thank you so much Riny!  Your formulas worked terrifically!  Have a wonderful week and weekend!  Take care.  

Kind Regards,

Steve