SOLVED

Average of cells containing numbers and blanks and text

%3CLINGO-SUB%20id%3D%22lingo-sub-3182234%22%20slang%3D%22en-US%22%3EAverage%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3182234%22%20slang%3D%22en-US%22%3EHow%20to%20have%20the%20average%20of%20cells%20that%20are%20mixed%20with%20numbers%20and%20empty%20and%20text%20to%20...%20So%20the%20function%20only%20consider%20numbers%20and%20return%20the%20average%20only%20of%20the%20numbers%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3ENote%2C%20the%20cells%20are%20not%20next%20or%20below%20each%20other.%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20help%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3182234%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3182357%22%20slang%3D%22en-US%22%3ERe%3A%20Average%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3182357%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1310949%22%20target%3D%22_blank%22%3E%40Shadysalman%3C%2FA%3E%26nbsp%3BWould%20a%20regular%20AVERAGE%20function%20not%20work%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-02-18%20at%2005.30.08.png%22%20style%3D%22width%3A%20309px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349384i6B7C78134D24175D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-02-18%20at%2005.30.08.png%22%20alt%3D%22Screenshot%202022-02-18%20at%2005.30.08.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3186145%22%20slang%3D%22en-US%22%3ERe%3A%20Average%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3186145%22%20slang%3D%22en-US%22%3ERegular%20average%20will%20count%20the%20cells%20when%20finding%20the%20average%2C%20regardless%20of%20their%20value%2C%20i%20want%20excel%20to%20have%20a%20formula%20where%20if%20the%20cell%20is%20empty%20not%20to%20count%20it%20when%20finding%20the%20average%20of%20other%20cells....%3CBR%20%2F%3E%3CBR%20%2F%3EE.g.%20i%20have%204%20cells%20..1%20empty%20and%201%20with%20text%20and%20other%202%20with%20numbers%20for%20example%20100%20and%20100....%20The%20simple%20average%20function%20if%20i%20do%20it%20it%20will%20return%20these%20cells%20result%20as%2050%20instead%20of%20100!!%20Because%20it%20divided%20on%204%20instead%20of%202.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3186147%22%20slang%3D%22en-US%22%3ERe%3A%20Average%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3186147%22%20slang%3D%22en-US%22%3EAlso%20the%20cells%20are%20not%20next%20to%20each%20other%2C%20so%20you%20cant%20select%20them%20at%20once%2C%20you%20have%20to%20select%20one%20by%20one%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EYour%20support%20is%20appreciated%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3186996%22%20slang%3D%22en-US%22%3ERe%3A%20Average%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3186996%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1310949%22%20target%3D%22_blank%22%3E%40Shadysalman%3C%2FA%3E%26nbsp%3BNot%20sure%20I%20follow.%20When%20I%20do%20exactly%20as%20you%20describe%20I%20get%20this%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-02-19%20at%2006.50.00.png%22%20style%3D%22width%3A%20340px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349661i26E9820FAF9F6A7A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-02-19%20at%2006.50.00.png%22%20alt%3D%22Screenshot%202022-02-19%20at%2006.50.00.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3191112%22%20slang%3D%22en-US%22%3ERe%3A%20Average%20of%20cells%20containing%20numbers%20and%20blanks%20and%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3191112%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%3Ethe%20first%20picture%20shows%20the%20formula%20result%20as%20100%25%20despite%20it%20has%200%25%20in%20more%20than%20once....%20and%20instead%20it%20should%20be%26nbsp%3B%2066%25.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Shadysalman_0-1645419567635.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349836i0423965AAC9762C7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Shadysalman_0-1645419567635.png%22%20alt%3D%22Shadysalman_0-1645419567635.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20the%202nd%20picture%20shows%20the%20average%20as%2039%20%25%20where%20it%20should%20be%20in%20fact%2074%25%20if%20the%20average%20did%20not%20consider%20the%20empty%20cells.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Shadysalman_1-1645419629609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349837iAE3FEE94536EFC7D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Shadysalman_1-1645419629609.png%22%20alt%3D%22Shadysalman_1-1645419629609.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20let%20me%20know%20if%20you%20know%20a%20solution.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20support.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
How to have the average of cells that are mixed with numbers and empty and text to ... So the function only consider numbers and return the average only of the numbers ?

Note, the cells are not next or below each other.

Please help
10 Replies

@Shadysalman Would a regular AVERAGE function not work?

Screenshot 2022-02-18 at 05.30.08.png

Regular average will count the cells when finding the average, regardless of their value, i want excel to have a formula where if the cell is empty not to count it when finding the average of other cells....

E.g. i have 4 cells ..1 empty and 1 with text and other 2 with numbers for example 100 and 100.... The simple average function if i do it it will return these cells result as 50 instead of 100!! Because it divided on 4 instead of 2.
Also the cells are not next to each other, so you cant select them at once, you have to select one by one


Your support is appreciated

@Shadysalman Not sure I follow. When I do exactly as you describe I get this:

Screenshot 2022-02-19 at 06.50.00.png

@Riny_van_Eekelen 

the first picture shows the formula result as 100% despite it has 0% in more than once.... and instead it should be  66%.

Shadysalman_0-1645419567635.png

 

and the 2nd picture shows the average as 39 % where it should be in fact 74% if the average did not consider the empty cells.

 

Shadysalman_1-1645419629609.png

 

 

please let me know if you know a solution. 

 

Thanks for the support.

@Shadysalman 

It looks like you obscure your data.

See picture.

 

It would be better to get real workbook for inspection.

 

@Shadysalman Replicated your examples with the numbers from the pictures and can not reproduce the incorrect calculation you mention. On the first one, 6 values of 100% plus 3 of 0% will always return an average of 66.67%. If your calculation does not, perhaps the 0% cells are in fact texts containing the string "0%". Then the answer becomes 100%.

On the second one, four times 100%, one 0%, one 25%, one 93% and two blanks return an average of 74%.  The only way I can come to an average of 39.33% is by averaging  (0+25+93), meaning that all other "numbers" are in fact texts like "100%".

@Riny_van_Eekelen 

 

Thanks for spending the time.

 

I just doubled check all the cells I have linked to the outcome cell, and all of them are percentage type not text. however it worth mentioning that all the cells have predefined formula that return the result in each of them.

See the attached for illustration.

 

Shadysalman_0-1645523541589.png

 

 

best response confirmed by Shadysalman (Occasional Contributor)
Solution

@Shadysalman Please remove the quotation marks around the percentages as they turn them to texts, no matter what format you have set for the cell.

Much appreciated for the solution, was simple one, but seems i need to understand formulas more