Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
cbarcroft
 
Posts: n/a
Default How do I add row total when cell contains both number and letter .

I have a timesheet spreadsheet. Cell contents include hours and coding.
Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay). I
want to have a total at the end but my formula will only read the cells that
don't have a letter after the number.
  #2   Report Post  
bj
 
Posts: n/a
Default

If the text value is always "V" you could use something like
=SUM(IF(RIGHT(A18:A21,1)="V",VALUE(LEFT(A18:A21,LE N(A18:A21)-1)),A18:A21))
entered as an array formula (control-shift -return)
If there are other codes than just V, it gets a little more complex. if the
coding is never more than just one character you could use
=SUM(IF(ISNUMBER(A18:A21),A18:A21,VALUE(LEFT(A18:A 21,LEN(A18:A21)-1))))
entered as array formula.

"cbarcroft" wrote:

I have a timesheet spreadsheet. Cell contents include hours and coding.
Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay). I
want to have a total at the end but my formula will only read the cells that
don't have a letter after the number.

  #3   Report Post  
carriebarcroft
 
Posts: n/a
Default

There are several codes used, but only one per cell. Example...
04/15 04/16 04/17
8 8V 8H

Does that make sense? I'd attach the spreadsheet if I could.

"bj" wrote:

If the text value is always "V" you could use something like
=SUM(IF(RIGHT(A18:A21,1)="V",VALUE(LEFT(A18:A21,LE N(A18:A21)-1)),A18:A21))
entered as an array formula (control-shift -return)
If there are other codes than just V, it gets a little more complex. if the
coding is never more than just one character you could use
=SUM(IF(ISNUMBER(A18:A21),A18:A21,VALUE(LEFT(A18:A 21,LEN(A18:A21)-1))))
entered as array formula.

"cbarcroft" wrote:

I have a timesheet spreadsheet. Cell contents include hours and coding.
Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay). I
want to have a total at the end but my formula will only read the cells that
don't have a letter after the number.

  #4   Report Post  
bj
 
Posts: n/a
Default

The second equation should work then

"carriebarcroft" wrote:

There are several codes used, but only one per cell. Example...
04/15 04/16 04/17
8 8V 8H

Does that make sense? I'd attach the spreadsheet if I could.

"bj" wrote:

If the text value is always "V" you could use something like
=SUM(IF(RIGHT(A18:A21,1)="V",VALUE(LEFT(A18:A21,LE N(A18:A21)-1)),A18:A21))
entered as an array formula (control-shift -return)
If there are other codes than just V, it gets a little more complex. if the
coding is never more than just one character you could use
=SUM(IF(ISNUMBER(A18:A21),A18:A21,VALUE(LEFT(A18:A 21,LEN(A18:A21)-1))))
entered as array formula.

"cbarcroft" wrote:

I have a timesheet spreadsheet. Cell contents include hours and coding.
Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay). I
want to have a total at the end but my formula will only read the cells that
don't have a letter after the number.

  #5   Report Post  
CLR
 
Posts: n/a
Default

=SUM(A1:A4)+(COUNTIF(A1:A4,"8v")*8)+(COUNTIF(A1:A4 ,"8H")*8)...etc etc for
additional codes........

Vaya con Dios,
Chuck, CABGx3


"cbarcroft" wrote in message
...
I have a timesheet spreadsheet. Cell contents include hours and coding.
Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay).

I
want to have a total at the end but my formula will only read the cells

that
don't have a letter after the number.



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
can't format cell - have tried unlocking and unprotecting griffin Excel Discussion (Misc queries) 1 April 5th 05 02:11 AM
Grand total same cell in all worksheets Don Kline Excel Worksheet Functions 2 April 2nd 05 06:32 PM
Cell addressing using the content of another cell. De Jandon Excel Worksheet Functions 5 April 1st 05 10:59 PM
Can a Formula in Cell X modify Cell Y? alMandragor Excel Discussion (Misc queries) 7 February 10th 05 09:51 PM
Total the sum in a cell Misty Excel Discussion (Misc queries) 4 February 1st 05 03:51 PM


All times are GMT +1. The time now is 08:13 AM.

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

About Us

"It's about Microsoft Excel"