Sum a row with cells that may be blank, and some rows that have letters and numbers.

rowrow780

New Member
Joined
Dec 26, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I am creating a vacation and sick tracker. Vacation identified by V. The number of hours will be after the letter V. .
I have tried a formula that has worked when there is no blanks however I have an error when there is blanks. There are blanks as we are only entering Vac hours on the cells ( represents the calendar days ) an employee takes the time.
How would I do this formula to sum total V hours?
Thank you!
 

Attachments

  • Screenshot 2022-12-26 134138.jpg
    Screenshot 2022-12-26 134138.jpg
    23.4 KB · Views: 18

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try:

Book1
ABCDEFGHIJKLMNO
1JanuarySuMTWThFSaSuMTWThFSa
2Employee123456789101112
3Test UserV5v5v2
4
5Sum of vacation
612
Sheet3
Cell Formulas
RangeFormula
A6A6=SUM(IF(LEFT(B3:M3)="v",MID(B3:M3,2,5)+0))
 
Upvote 0
Solution
Happy to help! Thanks for the update.
Hi Eric, i've run into a scenerio.. :(
what formula would i use to sum the total hours if an employee will take a combination of sick and vac hours?. Example : v5 ( vacation ) and s3 (sick ) in one day .

TIA!
 
Upvote 0
Try until Eric enters, not too good but works

Book7
ABCDEFGHIJKLMNO
1JanuarySuMTWThFSaSuMTWThFSa
2Employee123456789101112
3Test UserV5v5 s3v2
4
5Sum of vacation
615
7
8
Sheet2
Cell Formulas
RangeFormula
A6A6=SUM(IFERROR(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B3:M3,"v",0),"V",0),"S",0),"s",0),SEARCH(" ",B3:M3&" ")-1)+0,0))+SUM(IFERROR(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B3:M3,"v",0),"V",0),"S",0),"s",0),SEARCH(" ",B3:M3),5)+0,0))
 
Upvote 0
Thanks Sufiyan97 for stepping in, I kind of lost track of this one. Here's another option:

Book1
ABCDEFGHIJKLMNO
1JanuarySuMTWThFSaSuMTWThFSa
2Employee123456789101112
3Test UserV5v5 s3s1 v4v2
4
5Sum of vacation
620
7
8Vacation16
9Sick4
10Total20
Sheet2
Cell Formulas
RangeFormula
A6A6=SUM(IFERROR(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B3:M3,"v",0),"V",0),"S",0),"s",0),SEARCH(" ",B3:M3&" ")-1)+0,0))+SUM(IFERROR(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B3:M3,"v",0),"V",0),"S",0),"s",0),SEARCH(" ",B3:M3),5)+0,0))
B8B8=SUM(MID(B3:O3&"v0",SEARCH("v",B3:O3&"v")+1,1)+0)
B9B9=SUM(MID(B3:O3&"s0",SEARCH("s",B3:O3&"s")+1,1)+0)
B10B10=SUM(B8:B9)


This assumes that the number of hours is always 1 digit. If you want, you can combine the B8 and B9 formulas into one cell easy enough.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top