Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to use fixed format information in a file (used to be printed) to
Excel 2003. One goal is to try to make the spreadsheet look as close to the data file as possible. I'm also trying to disturb the user's environment as little as possible and drive Excel from the program. I'm currently filling in the proper cells with the right data but have some limitations that I'd like to overcome. Can I tell Excel to use a fixed-sized font? Can I tell Excel to use a red background for selected cells without knowing the cell number? A column may not always have numbers (perhaps column headers, etc.) Can I indicate that if a cell in column 10, 11, or 13 is numeric, it should be formatted to always have two decimal places? It should still remain a number and not be converted to text, kind of like using Format-Cell-Number-Currency. Sometimes a number (250.00 and -332.11, both with following spaces) will not be converted to a number. The cell has an error message of "The number in this cell is formatted as text or preceeded by an apostrophe." What do I need to do to get rid of the error? I tried preceeding all numbers in the column with an "=" so the numbers ended up being "= 250.00" [space follows the equal] or "=-322.11" [minus sign replaced the space"]. That caused a different error on other cells: "The formula in this cell differs from the formulas in this area of the spreadsheet." Interestingly enough, the same column has one value of 6.02 with the 2nd error message and one value of 6.02 without. The solution to this whole formatting mess may be to format all numbers as text and let the user format them to be numeric if that's needed. I know this is a bunch of questions. Thanks for your time. Scott |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I suggest you read the information at this site then re-post.
http://www.cpearson.com/excel/HintsA...roupUsers.aspx "scottb2" wrote: I'm trying to use fixed format information in a file (used to be printed) to Excel 2003. One goal is to try to make the spreadsheet look as close to the data file as possible. I'm also trying to disturb the user's environment as little as possible and drive Excel from the program. I'm currently filling in the proper cells with the right data but have some limitations that I'd like to overcome. Can I tell Excel to use a fixed-sized font? Can I tell Excel to use a red background for selected cells without knowing the cell number? A column may not always have numbers (perhaps column headers, etc.) Can I indicate that if a cell in column 10, 11, or 13 is numeric, it should be formatted to always have two decimal places? It should still remain a number and not be converted to text, kind of like using Format-Cell-Number-Currency. Sometimes a number (250.00 and -332.11, both with following spaces) will not be converted to a number. The cell has an error message of "The number in this cell is formatted as text or preceeded by an apostrophe." What do I need to do to get rid of the error? I tried preceeding all numbers in the column with an "=" so the numbers ended up being "= 250.00" [space follows the equal] or "=-322.11" [minus sign replaced the space"]. That caused a different error on other cells: "The formula in this cell differs from the formulas in this area of the spreadsheet." Interestingly enough, the same column has one value of 6.02 with the 2nd error message and one value of 6.02 without. The solution to this whole formatting mess may be to format all numbers as text and let the user format them to be numeric if that's needed. I know this is a bunch of questions. Thanks for your time. Scott |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Programmatically create button on Excel worksheet (vb.net) | Excel Programming | |||
if i cut and paste from html into excel, i cannot create formulas | Excel Discussion (Misc queries) | |||
Create programmatically list of combinations for choices from data sets in excel vba | Excel Programming | |||
From Excel 97 Programmatically create access 97 or 2000 database and export data to. | Excel Programming | |||
Create Excel sheet in HTML with comments | Excel Programming |