Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks I tried that code over the whole range of data and spent time looking
at each cell. All cells I was looking to be as a number were and all the text fields were text fields, so I dont understand why this doesnt work... =MAX(C12,F12,I12,C24,F24) "Joel" wrote: You can use this simple macro to find the cells that are text. Cahnge the range A1:D10 as required. Sub findtext() Set SearchRange = Range("A1:D10") For Each cell In SearchRange If Not IsNumeric(cell) Then MsgBox ("Cell : " & cell.Address & " is Text") End If Next cell End Sub "Jez" wrote: All the Cells are already set to General, The Field I take them from in SQL Server is an INT. Clicking on the cell shows no single quote or space in front of the number I dont know where to go from here "Joel" wrote: I can't tell what the problem is without seeing the SQL statements. The data may be stored in the database (or website) in text format, th eSQL statements may be converting the numbers to text, or the spreadsheet may be formated as text. Here are some thngs to check 1) Click on a cell and see if there is a single quote infront of the number or a space in front of the number. 2) click on the cell and then check the format by going to menu Format - Cels - Number ans seeing which format is highlighted. If the format is TEXT change format to number or general. "Jez" wrote: I have code that imports a query from SQL Server and pastes the results into certain cells. This works great, my problem is that when I come to find the Max number from a range of cells, they all seem to be as Text... How can when importing them change them from Text to Number? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Changes Text Cells to Number Cells When Importing XML | Excel Discussion (Misc queries) | |||
Importing text--cell text limit? | Excel Discussion (Misc queries) | |||
Importing DBF with large number of fields | Excel Programming | |||
Importing CSV file (saved as Text) into XL as Text -- over 60 colu | Excel Discussion (Misc queries) | |||
Importing a Large Number of Columns | Excel Discussion (Misc queries) |