Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formatting a Sentence With TEXT Function

I have what is essentially a simple formatting question that involves
combining a TEXT function within a sentence. Before I get to my
question I ought to provide some context.

I built a table that uses VLOOKUP to list the number of cases sold by
month.Then I need to show the net difference in cases sold between the
current month and the same month a year ago. The table works fine. My
problem lies in building a sentence that states this difference. The
heart of the problem is that forces beyond my control insist that the
difference in the number of cases be expressed as XXXk rather than the
whole number XXX,XXX.

Here's an example.
The date "Jan 2010" is in cell N2 (As an aside, the all-knowing powers
that be insist the date be formatted as 2010/01)
The date "Jan 2009" is in cell B2
The number of Jan 2010 case sales are in N3; the amount is 6,053,021
The number of Jan 2009 case sales are in cell B3; the amount is
4,840,747
The difference is 1,212,274 (did I tell you I was a math major?)
(Between columns B and N are the number of case sales for Feb thru
Nov)

To summarize the report I need a sentence string that reads: 2009/01
versus 2010/01 sales is 1,212k cases

Here's the formula I created for this sentence:
=TEXT(B2," "yyyy/mm")&" versus "&TEXT(N2,"yyyy/mm")&" sales is
"&TEXT(ROUNDDOWN(N3-B3)/1000,"#,#")&"k cases"

So after all this set-up, here's my goofy little problem. There's a
space that I can't get rid of between the difference in the number of
cases and the "k" ,which I need to have snugly fit against it. I have
made sure that there is no space sneaking when I type "k cases"

Now I'm an easy-going guy who could let this slide but the individual
in charge of this project finds it unacceptable. Any help is
appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Formatting a Sentence With TEXT Function

"#,#k")&" cases"


Gord Dibben MS Excel MVP


On Mon, 15 Feb 2010 14:21:12 -0800 (PST), Evan
wrote:

I have what is essentially a simple formatting question that involves
combining a TEXT function within a sentence. Before I get to my
question I ought to provide some context.

I built a table that uses VLOOKUP to list the number of cases sold by
month.Then I need to show the net difference in cases sold between the
current month and the same month a year ago. The table works fine. My
problem lies in building a sentence that states this difference. The
heart of the problem is that forces beyond my control insist that the
difference in the number of cases be expressed as XXXk rather than the
whole number XXX,XXX.

Here's an example.
The date "Jan 2010" is in cell N2 (As an aside, the all-knowing powers
that be insist the date be formatted as 2010/01)
The date "Jan 2009" is in cell B2
The number of Jan 2010 case sales are in N3; the amount is 6,053,021
The number of Jan 2009 case sales are in cell B3; the amount is
4,840,747
The difference is 1,212,274 (did I tell you I was a math major?)
(Between columns B and N are the number of case sales for Feb thru
Nov)

To summarize the report I need a sentence string that reads: 2009/01
versus 2010/01 sales is 1,212k cases

Here's the formula I created for this sentence:
=TEXT(B2," "yyyy/mm")&" versus "&TEXT(N2,"yyyy/mm")&" sales is
"&TEXT(ROUNDDOWN(N3-B3)/1000,"#,#")&"k cases"

So after all this set-up, here's my goofy little problem. There's a
space that I can't get rid of between the difference in the number of
cases and the "k" ,which I need to have snugly fit against it. I have
made sure that there is no space sneaking when I type "k cases"

Now I'm an easy-going guy who could let this slide but the individual
in charge of this project finds it unacceptable. Any help is
appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Formatting a Sentence With TEXT Function

In addition to what Gord Dibben provided, shouldn't the
ROUNDDOWN(N3-B3)/1000,
portion be
ROUNDDOWN(N3-B3,1)/1000,
?
From Excel 2003 Help for ROUNDDOWN():
Syntax

ROUNDDOWN(number,num_digits)

Number is any real number that you want rounded down.

Num_digits is the number of digits to which you want to round number.


"Evan" wrote:

I have what is essentially a simple formatting question that involves
combining a TEXT function within a sentence. Before I get to my
question I ought to provide some context.

I built a table that uses VLOOKUP to list the number of cases sold by
month.Then I need to show the net difference in cases sold between the
current month and the same month a year ago. The table works fine. My
problem lies in building a sentence that states this difference. The
heart of the problem is that forces beyond my control insist that the
difference in the number of cases be expressed as XXXk rather than the
whole number XXX,XXX.

Here's an example.
The date "Jan 2010" is in cell N2 (As an aside, the all-knowing powers
that be insist the date be formatted as 2010/01)
The date "Jan 2009" is in cell B2
The number of Jan 2010 case sales are in N3; the amount is 6,053,021
The number of Jan 2009 case sales are in cell B3; the amount is
4,840,747
The difference is 1,212,274 (did I tell you I was a math major?)
(Between columns B and N are the number of case sales for Feb thru
Nov)

To summarize the report I need a sentence string that reads: 2009/01
versus 2010/01 sales is 1,212k cases

Here's the formula I created for this sentence:
=TEXT(B2," "yyyy/mm")&" versus "&TEXT(N2,"yyyy/mm")&" sales is
"&TEXT(ROUNDDOWN(N3-B3)/1000,"#,#")&"k cases"

So after all this set-up, here's my goofy little problem. There's a
space that I can't get rid of between the difference in the number of
cases and the "k" ,which I need to have snugly fit against it. I have
made sure that there is no space sneaking when I type "k cases"

Now I'm an easy-going guy who could let this slide but the individual
in charge of this project finds it unacceptable. Any help is
appreciated.
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting a sentence with functions Josh Craig Excel Worksheet Functions 2 October 27th 09 03:09 AM
HYPERLINK - insert within a text sentence Jane Excel Worksheet Functions 1 September 22nd 06 06:07 PM
Sentence (text) running off grid ECC Excel Discussion (Misc queries) 0 April 28th 06 06:31 PM
Is it possible to insert a function within a sentence in Excel 200 Mal Excel Worksheet Functions 1 April 5th 06 09:33 PM
how do i enter a function in a sentence Joe Reyes Excel Worksheet Functions 2 February 7th 06 05:00 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"