Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing figures within letters???


Hi all, is it possible to sum cells that have both letters and figures
in?, i have lists of figures some of which look like this £3.5m, £5m
etc is it possible to write a formula which just sums the figures?

All help or suggestions appreciated.

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571172

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Summing figures within letters???

ASAP Utilities, a free add-in available at www.asap-utilities.com has a
feature that will strip out all of the alpha-characters......leaving just
the numerical ones to do your math with.

hth
Vaya con Dios,
Chuck, CABGx3


"Simon Lloyd"
wrote in message
...

Hi all, is it possible to sum cells that have both letters and figures
in?, i have lists of figures some of which look like this £3.5m, £5m
etc is it possible to write a formula which just sums the figures?

All help or suggestions appreciated.

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571172



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Summing figures within letters???

On Sun, 13 Aug 2006 12:43:32 -0400, Simon Lloyd
wrote:


Hi all, is it possible to sum cells that have both letters and figures
in?, i have lists of figures some of which look like this £3.5m, £5m
etc is it possible to write a formula which just sums the figures?

All help or suggestions appreciated.

Regards,
Simon


One way:

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr

Then to extract a number, use this Regular Expression formula:

=REGEX.MID(A1,"(\d+(\.\d*)?)|(\.\d+)")

However, that extracts the number as a text string.

To change it into a number value, precede by a double unary:

=--REGEX.MID(A1,"(\d+(\.\d*)?)|(\.\d+)")

Unfortunately, that will result in an #VALUE! error if there is no number in
the string. If that is a problem, this formula will result in either the
value, or a zero.

=IF(REGEX.COMP(A1,"\d"),--REGEX.MID(A1,"(\d+(\.\d*)?)|(\.\d+)"),0)

If you'd rather have a null string that a zero:

=IF(REGEX.COMP(A1,"\d"),--REGEX.MID(A1,"(\d+(\.\d*)?)|(\.\d+)"),"")

Finally, if the values can be negative numbers, the formula can be modified,
but we need to know the format of a negative value.


--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing figures within letters???


Guys thanks for the replies!, Don i would like to use your suggestion as
an add-in is not an option because i would have to install the add-in on
every machine, could you give me a hand on how to use what you have
supplied......i did try adding it to a w/s but didnt actually get what
i needed, probably because the way i was using it

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571172



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing figures within letters???


Simon Lloyd Wrote:
Hi all, is it possible to sum cells that have both letters and figures
in?, i have lists of figures some of which look like this £3.5m, £5m
etc is it possible to write a formula which just sums the figures?

All help or suggestions appreciated.

Regards,
Simon

Hi Simon,

If your figures are in column A, then in B1

=SUBSTITUTE(SUBSTITUTE(A1,"£",""),"m","") then drag/copy this down,
then in the totals cell

=SUM(VALUE(B1:B3)) entered as an array - Ctrl:Shift:Enter so the the
braces appear like so

{=SUM(VALUE(B1:B3))}

Hope this helps

oldchippy :)


--
oldchippy
------------------------------------------------------------------------
oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
View this thread: http://www.excelforum.com/showthread...hreadid=571172

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Summing figures within letters???

On Sun, 13 Aug 2006 15:40:14 -0400, Simon Lloyd
wrote:


Guys thanks for the replies!, Don i would like to use your suggestion as
an add-in is not an option because i would have to install the add-in on
every machine, could you give me a hand on how to use what you have
supplied......i did try adding it to a w/s but didnt actually get what
i needed, probably because the way i was using it

Regards,
Simon


Simon,

Longre's morefunc.xll can be easily distributed with the workbook. No need to
have everyone install the add-in.

When you install the add-in on your machine, you can also (optionally) install
a morefunc sub-menu. One of the options is to "embed morefunc in this
workbook".


--ron
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing figures within letters???


Again i'm overwhelmed by the replies, Don you did explain i managed it
after i sent the response, but as i get up at 5am it was a little late
to write back. Chippy thanks for the explanation it was clear and
concise. Ron i am on a network machine which has every file filtered
and checked before a recipient gets it, there is a maximum file size
and most machines have had their permissions for install or security
changes denied so i thought it may cause problems, but i thank you for
taking the time to explain.

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571172

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting a Worksheet using Capital letters This Guy Excel Worksheet Functions 0 April 25th 06 04:56 AM
Excel formula for summing using figures from adjoining rows [email protected] Excel Worksheet Functions 3 March 17th 06 02:26 AM
Replacing letters for figures in formula Irene Excel Discussion (Misc queries) 11 January 6th 06 02:39 PM
summing up figures Rich Excel Discussion (Misc queries) 2 December 12th 05 02:03 PM
Calculate minus figures only Nigel Excel Discussion (Misc queries) 0 March 30th 05 10:31 AM


All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"