# Assign Value to a Letter

#### Alberto5501

##### New Member
Hello

So Im making a worksheet that calculates vacation/sick days.

I want that, In the chart below, if I write "V" it will automatically subtract "8" hours from the vacation chart (left). And If I write "E" (sick), it will subtract "8" hours from the sickness chart (right).

The subtracted value should go in the "DESC" column of each chart.

The thing is, that I managed to "do it" using =SUM(COUNTIF(B29:AF29,"V")), but it worked when I used the charts as days, now my boss wants to measure things in hours. Since it subtracted "1" for each V/E, now each V/E should subtract 8.

Is this possible? I've searched everywhere and signed only for this.

Thanks

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### Tetra201

##### MrExcel MVP
Why not use =8*COUNTIF(B29:AF29,"V")?

#### Alberto5501

##### New Member
Hi

Thanks, for your reply. I've managed to do it using this formula

=SUM(COUNTIF(B28:AF28,{"V"})*{1,}).

I'll try yours too. Thanks again!

Replies
7
Views
161
Replies
2
Views
400
Replies
12
Views
194
Replies
6
Views
366
Replies
3
Views
851

1,191,688
Messages
5,988,080
Members
440,125
Latest member
vincentchu2369

### 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.

### Which adblocker are you using?

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

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