Treat value in cell as number?

tQk.Sushi

New Member
Joined
Aug 26, 2011
Messages
11
Basically I have a column that uses a function to generate numbers. But when I try to use the =SUM function on that column, it doesn't sum up anything because they consider my function as text. Is there a way to make the values in cell be number so that the =SUM function can work?

Thank you.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
the formula is rather complicated but here it is:

=IF(AND($D3<$K$3,C3="Quadruple (4) Occupancy Room"),"185",IF(AND($D3<$K$3,C3="Triple (3) Occupancy Room"),"215",IF(AND($D3<$K$3,$C3="Double (2) Occupancy Room"),"265",IF(AND($D3<$K$3,$C3="Single (1) Occupancy Room"),"465",IF(AND($D3<=$K$3,C3="I will not be staying at the hotel"),"55",IF(AND($D3<$L$3,$D3>=$K$3,$C3="Quadruple (4) Occupancy Room"),"200",IF(AND($D3<$L$3,$D3>=$K$3,$C3="Triple (3) Occupancy Room"),"230",IF(AND($D3<$L$3,$D3>=$K$3,$C3="Double (2) Occupancy Room"),"280",IF(AND($D3<$L$3,$D3>=$K$3,$C3="Single (1) Occupancy Room"),"480",IF(AND($D3>=$K$3,$C3,$D3<$L$3="I will not be staying at the hotel"),"70",IF(AND($D3>=$L$3,C3="Quadruple (4) Occupancy Room"),"215",IF(AND($D3>=$L$3,C3="Triple (3) Occupancy Room"),"245",IF(AND($D3>=$L$3,C3="Double (2) Occupancy Room"),"295",IF(AND($D3>=$L$3,C3="Single (1) Occupancy Room"),"495",IF(AND($D3>=$L$3,C3="I will not be staying at the hotel"),"85",)))))))))))))))


it will either generate 185, 215, 265, etc. but I think the number that gets generated is considered "text" and because of that the =SUM function won't work.
 
Upvote 0
Just remove the "" from the numbers like this

=IF(AND($D3<$K$3,C3="Quadruple (4) Occupancy Room"),185,IF(AND($D3<$K$3,C3="Triple (3) Occupancy Room"),215
 
Upvote 0
actually i have one more question

there seems to be an error somewhere in my code. basically my code says if u register between 9/24/11 and 10/31/11 and you've requested to not stay at the hotel, the formula should generate 70. But mine just generates a 0.

I am referring to this part of my function:
IF(AND($D12>=$K$3,$C12,$D12<$L$3="I will not be staying at the hotel"),70
 
Upvote 0
There seems to be something missing or should it be


IF(AND($D12>=$K$3,$D12<$L$3,$C12="I will not be staying at the hotel"),70
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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