View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Strip Out Four Characters, then Average

Mike, yours calculated the Median. I needed the Mean and the Median. Dave,
your function worked perfect. I got the average, then got the median;
everything works great now!!

Thanks all!!
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Glenn" wrote:

ryguy7272 wrote:
I posted this onto the end of a post that I put up earlier today. This is
tough and I can't tell if people stopped reading the old post or if no one
has been able to come up with a solution.

Basically, this is the scenario:
New request; just a bit different. I have this kind of setup in several
cells:
="(-30.5)"

This will eliminate the left parentheses:
=SUBSTITUTE(AD8,CHAR(40),"")

This gets rid of the right:
=SUBSTITUTE(AD8,CHAR(41),"")

Also, I have to get rid of the quotes!! Four characters need to be
stripped, and I want to calculate an average on top of that!! I know it's a
tall order. Can it be done?

I tried this, committed with CSE:
=AVERAGE(--SUBSTITUTE(AD8:AD12,CHAR(40),""))--SUBSTITUTE(AD8:AD12,CHAR(41),"")

That didn't work, but even if it did, I would still need to strip out the
quotes somehow. Any ideas on this?

Thanks,
Ryan---




Array formula (commit with CTRL+SHIFT+ENTER):

=AVERAGE(--SUBSTITUTE(SUBSTITUTE(AD8:AD12,")",""),"(",""))