![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 85
|
Ok. I don't understand what is going on here. If I have numbers "1-3" in a cell, Excel with pick up the numbers and format them as if they represent a date and change output to "1-Jan" or "37259". Anyone know how I can programatically turn this off or prevent this function?
Thanks! |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Edinburgh, Bonnie Scotland
Posts: 820
|
Format the cells to be general instead of date. This should do it.
__________________
George J |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Florida
Posts: 82
|
If you do not need to have a number format try formating the cell for text...........
Denny |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Posts: 85
|
That didn't work. Originally I have the numbers "1,2,3" and a function is called to convert them to "1-3". Once the conversion occurs, Excel pastes the numbers in the cell and Excel converts it to "03-Jan"(really 01/03/2002, if you select that cell.
Help! I just want it to say "1-3", which is why I created the function to do exactly that. Thanks! |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Edinburgh, Bonnie Scotland
Posts: 820
|
Can you show the formula or VBA code you are using? Also, is the cell that is having 1,2,3 entered into it the same cell that 1-3 should be appearing?
__________________
George J |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Posts: 85
|
It is the same cell. I am using one procedure to FindRanges(1,2,3 to 1-3) and another to Format(make Bold,Blue,MergeCells,etc)
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Apr 2002
Posts: 85
|
Got it! I used Selection.Numberformat = "@" to convert the cell to Text before I paste.
Thanks alot all for your help! Regards |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|