Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Formatting a Cell or Merged Cells

I would like to format a cell to write out an amount of money in another
cell. Like on a Cheque. Example. $6.25 = Six and 25/100. The written portion
would change automatically when the amount changes.

Can someone tell me if formatting exists.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Formatting a Cell or Merged Cells

There is no built in formatting to do this, however, it's not rocket science
to write it:

Function TextMe(Real_Number As Variant) As String

Dim myString As String

'Thousands
If (Int(Real_Number / 1000) < 0) Then
myString = Int(Real_Number / 1000) & " thousand"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 1000) * 1000)

If (Int(Real_Number / 100) < 0) Then
If myString < "" Then
myString = myString & ", "
End If
myString = myString & Int(Real_Number / 100) & " hundred"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 100) * 100)

etc.

TextMe = myString

End Function


"DebbieSue" wrote:

I would like to format a cell to write out an amount of money in another
cell. Like on a Cheque. Example. $6.25 = Six and 25/100. The written portion
would change automatically when the amount changes.

Can someone tell me if formatting exists.

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Formatting a Cell or Merged Cells

In my case, I would need to be a rocket scientist. I used the function and I
typed in 385.25 and it gave me 3 hundred. That was it. Nothing else. I am
very new to this, so sorry if I'm a pain.

Thank you,
Debbie

"BobT" wrote:

There is no built in formatting to do this, however, it's not rocket science
to write it:

Function TextMe(Real_Number As Variant) As String

Dim myString As String

'Thousands
If (Int(Real_Number / 1000) < 0) Then
myString = Int(Real_Number / 1000) & " thousand"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 1000) * 1000)

If (Int(Real_Number / 100) < 0) Then
If myString < "" Then
myString = myString & ", "
End If
myString = myString & Int(Real_Number / 100) & " hundred"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 100) * 100)

etc.

TextMe = myString

End Function


"DebbieSue" wrote:

I would like to format a cell to write out an amount of money in another
cell. Like on a Cheque. Example. $6.25 = Six and 25/100. The written portion
would change automatically when the amount changes.

Can someone tell me if formatting exists.

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Formatting a Cell or Merged Cells

Have a look at Bob Phillips' site for several methods.

http://www.xldynamic.com/source/xld.xlFAQ0004.html

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm


Gord Dibben MS Excel MVP

On Fri, 17 Oct 2008 10:24:00 -0700, DebbieSue
wrote:

In my case, I would need to be a rocket scientist. I used the function and I
typed in 385.25 and it gave me 3 hundred. That was it. Nothing else. I am
very new to this, so sorry if I'm a pain.

Thank you,
Debbie

"BobT" wrote:

There is no built in formatting to do this, however, it's not rocket science
to write it:

Function TextMe(Real_Number As Variant) As String

Dim myString As String

'Thousands
If (Int(Real_Number / 1000) < 0) Then
myString = Int(Real_Number / 1000) & " thousand"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 1000) * 1000)

If (Int(Real_Number / 100) < 0) Then
If myString < "" Then
myString = myString & ", "
End If
myString = myString & Int(Real_Number / 100) & " hundred"
End If

'Get remainder
Real_Number = Real_Number - (Int(Real_Number / 100) * 100)

etc.

TextMe = myString

End Function


"DebbieSue" wrote:

I would like to format a cell to write out an amount of money in another
cell. Like on a Cheque. Example. $6.25 = Six and 25/100. The written portion
would change automatically when the amount changes.

Can someone tell me if formatting exists.

Thank you.


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
Insert Row and keep merged cells formatting CK Excel Discussion (Misc queries) 1 February 2nd 08 12:26 AM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Conditional formatting with merged cells mjarantilla Excel Programming 3 November 29th 06 12:33 AM
Conditional Formatting Merged Cells Yvonne Excel Worksheet Functions 0 August 28th 06 07:36 PM
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM


All times are GMT +1. The time now is 01:10 PM.

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"