formula with text & numbers

pagrender

Well-known Member
Joined
Sep 3, 2008
Messages
652
Hi,

I am having problems making a formula work for me.

Here is the formula:
=IF(U157>0,"enrollment for the years "&U156&" to "&V156&" will increase from "&TEXT(K175,"0,000")&" to "&TEXT(P175,"0,000")&", which is an increase of "&TEXT(V157,"0.0%."),"enrollment for the years "&U156&" to "&V156&" will decrease from "&TEXT(K175,"0,000")&" to "&TEXT(P175,"0,000")&", which is a decrease of "&TEXT(-V157,"0.0%."))

Here is the result of the formula:
<TABLE style="WIDTH: 516pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=687><COLGROUP><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" span=12 width=40><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 1572" width=43><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" span=2 width=40><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 1536" span=2 width=42><TBODY><TR style="HEIGHT: 19.5pt; mso-height-source: userset" height=26><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 516pt; HEIGHT: 19.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; mso-ignore: colspan" class=xl70 height=26 width=687 colSpan=17 align=center>enrollment for the years 2011 to 2016 will decrease from 0,778 to 0,632, which is a decrease of 18.7%.</TD></TR></TBODY></TABLE>

This formula works fine when my enrollment count is greater than 1,000. I would like the 0,778 to be 778. Is there an easy way to make this formula work for values less than and greater than 1000?

WriteUp

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 53px"><COL style="WIDTH: 62px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>U</TD><TD>V</TD></TR><TR style="HEIGHT: 26px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">156</TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 12pt">2011</TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 12pt">2016</TD></TR><TR style="HEIGHT: 26px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">157</TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 12pt">(146)</TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 12pt">-18.7%</TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; BORDER-LEFT-STYLE: groove; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>U156</TD><TD>="20"&RIGHT(K161,2)</TD></TR><TR><TD>V156</TD><TD>="20"&RIGHT(P161,2)</TD></TR><TR><TD>U157</TD><TD>=P175-K175</TD></TR><TR><TD>V157</TD><TD>=U157/K175</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 40px"><COL style="WIDTH: 40px"><COL style="WIDTH: 43px"><COL style="WIDTH: 40px"><COL style="WIDTH: 40px"><COL style="WIDTH: 42px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>K</TD><TD>L</TD><TD>M</TD><TD>N</TD><TD>O</TD><TD>P</TD></TR><TR style="HEIGHT: 26px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">175</TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">778 </TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">740 </TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">725 </TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">686 </TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">658 </TD><TD style="TEXT-ALIGN: right; FONT-FAMILY: Calibri; FONT-SIZE: 9pt">632 </TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; BORDER-LEFT-STYLE: groove; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>K175</TD><TD>=SUM(K162:K174)</TD></TR><TR><TD>L175</TD><TD>=SUM(L162:L174)</TD></TR><TR><TD>M175</TD><TD>=SUM(M162:M174)</TD></TR><TR><TD>N175</TD><TD>=SUM(N162:N174)</TD></TR><TR><TD>O175</TD><TD>=SUM(O162:O174)</TD></TR><TR><TD>P175</TD><TD>=SUM(P162:P174)</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi,

I am having problems making a formula work for me.

Here is the formula:
=IF(U157>0,"enrollment for the years "&U156&" to "&V156&" will increase from "&TEXT(K175,"0,000")&" to "&TEXT(P175,"0,000")&", which is an increase of "&TEXT(V157,"0.0%."),"enrollment for the years "&U156&" to "&V156&" will decrease from "&TEXT(K175,"0,000")&" to "&TEXT(P175,"0,000")&", which is a decrease of "&TEXT(-V157,"0.0%."))

Here is the result of the formula:
<TABLE style="WIDTH: 516pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=687 border=0><COLGROUP><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" span=12 width=40><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 1572" width=43><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" span=2 width=40><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 1536" span=2 width=42><TBODY><TR style="HEIGHT: 19.5pt; mso-height-source: userset" height=26><TD class=xl70 style="BORDER-RIGHT: #f0f0f0; BORDER-TOP: #f0f0f0; BORDER-LEFT: #f0f0f0; WIDTH: 516pt; BORDER-BOTTOM: #f0f0f0; HEIGHT: 19.5pt; BACKGROUND-COLOR: transparent; mso-ignore: colspan" align=middle width=687 colSpan=17 height=26>enrollment for the years 2011 to 2016 will decrease from 0,778 to 0,632, which is a decrease of 18.7%.</TD></TR></TBODY></TABLE>

This formula works fine when my enrollment count is greater than 1,000. I would like the 0,778 to be 778. Is there an easy way to make this formula work for values less than and greater than 1000?

WriteUp

<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 10pt; FONT-FAMILY: Arial,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 53px"><COL style="WIDTH: 62px"></COLGROUP><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD></TD><TD>U</TD><TD>V</TD></TR><TR style="HEIGHT: 26px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">156</TD><TD style="FONT-SIZE: 12pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">2011</TD><TD style="FONT-SIZE: 12pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">2016</TD></TR><TR style="HEIGHT: 26px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">157</TD><TD style="FONT-SIZE: 12pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">(146)</TD><TD style="FONT-SIZE: 12pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">-18.7%</TD></TR></TBODY></TABLE>
<TABLE style="FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00; BORDER-BOTTOM-COLOR: #00ff00; COLOR: #000000; BORDER-TOP-STYLE: groove; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-RIGHT-COLOR: #00ff00; BORDER-BOTTOM-STYLE: groove"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=2 border=1><TBODY><TR style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #cacaca"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>U156</TD><TD>="20"&RIGHT(K161,2)</TD></TR><TR><TD>V156</TD><TD>="20"&RIGHT(P161,2)</TD></TR><TR><TD>U157</TD><TD>=P175-K175</TD></TR><TR><TD>V157</TD><TD>=U157/K175</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 10pt; FONT-FAMILY: Arial,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 40px"><COL style="WIDTH: 40px"><COL style="WIDTH: 43px"><COL style="WIDTH: 40px"><COL style="WIDTH: 40px"><COL style="WIDTH: 42px"></COLGROUP><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD></TD><TD>K</TD><TD>L</TD><TD>M</TD><TD>N</TD><TD>O</TD><TD>P</TD></TR><TR style="HEIGHT: 26px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">175</TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">778 </TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">740 </TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">725 </TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">686 </TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">658 </TD><TD style="FONT-SIZE: 9pt; FONT-FAMILY: Calibri; TEXT-ALIGN: right">632 </TD></TR></TBODY></TABLE>
<TABLE style="FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00; BORDER-BOTTOM-COLOR: #00ff00; COLOR: #000000; BORDER-TOP-STYLE: groove; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-RIGHT-COLOR: #00ff00; BORDER-BOTTOM-STYLE: groove"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=2 border=1><TBODY><TR style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #cacaca"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>K175</TD><TD>=SUM(K162:K174)</TD></TR><TR><TD>L175</TD><TD>=SUM(L162:L174)</TD></TR><TR><TD>M175</TD><TD>=SUM(M162:M174)</TD></TR><TR><TD>N175</TD><TD>=SUM(N162:N174)</TD></TR><TR><TD>O175</TD><TD>=SUM(O162:O174)</TD></TR><TR><TD>P175</TD><TD>=SUM(P162:P174)</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
Change your TEXT code "0,000" to "#,###".
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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