Can I make a word represent a certain number in Excel?

bennyh82

New Member
Joined
Oct 24, 2018
Messages
3
Hi there,

I'm new to the Forum and an Excel novice so I was hoping someone might be able to help with my query!

I'm interested to know if a word can represent a certain number in Excel? I have searched the forum for answers to similar questions and seen some responses regarding VLOOKUPS but I'm not sure if this is the right route to go down or how I would go about this anyway.

My worksheet contains data about nursery attendances and I ideally want the word 'Full Day' to represent a value (say, £20) and the word 'Half Day' to represent a value (say, £10). The table would look something like the below:

A B C D E F G
1 Child Name Monday Tuesday Wednesday Thursday Friday Weekly Spend
2 Andrew Full Day Full Day Full Day
3 Bethany Full Day Half Day Half Day
4 Chris Full Day Full Day Full Day Half Day

and I would like the 'Weekly Spend' column to calculate the weekly spend based on the values represented by the words 'Half Day' and 'Full Day' - so Andrew would be £60, Bethany would be £40, etc.

I would be really grateful if anyone could help me out with this - please just message me back if the question doesn't make sense and I'll try and include more detail/explain myself better! I'm using Excel 2016 on Windows, by the way.

Thanks!

Ben
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi & welcome to MrExcel.
Maybe
=COUNTIF(B2:F2,"Full Day")*20+COUNTIF(B2:F2,"Half Day")*10
 
Upvote 0
Hi and thanks for the quick reply!

I've tried entering that formula into the 'Weekly Spend' column but it just comes out as '0'. Some days were initially blank and I thought this might be the problem but even when I make sure each day is filled with either 'Full Day' or 'Half Day' it still comes out as zero.

Please let me know if you have any other suggestions or a potential workaround to overcome this issue.

Thanks again,

Ben
 
Upvote 0
Make sure that you only have one space before the word Day & that there are no leading/trailing spaces. This is what I get


Excel 2013/2016
ABCDEFG
1ChildMondayTuesdayWednesdayThursdayFriday
2aFull Dayfull dayhalf day50
3bhalf dayFull DayFull Day50
4cFull dayFull DayHalf DayHalf day60
5dFull dayFull DayFull DayFull Day80
Sheet1
Cell Formulas
RangeFormula
G2=COUNTIF(B2:F2,"Full Day")*20+COUNTIF(B2:F2,"Half Day")*10
 
Upvote 0
Ah yes, it works perfectly now! Turns out there were trailing/leading spaces everywhere.

Thanks for taking the time to explain, I really appreciate your help.

Cheers,

Ben
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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