Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing from MS Project -- problems with commas
I am importing information from MS Project to Excel due to some legacy
code. This information has to be modified a bit to work as planned in Excel, and this "trimming" is done by the macro submitted in the end of this message. This "trimming" of the imported information works fine for integers, but none of the cells containing floats (e.g. 15,2) is summed up like it should in the bottom of the sheet. The mystery is that if I open one the cells containing a float and do nothing the total sum picks up the value. So to get the correct result I have to manually open all cells containing float in order to get the right result. So the question becomes: How can I get this into my macro? Sub BC_TrimNumbers() I = ActiveCell.CurrentRegion.Rows.Count + 8 sTmp = "=Sheet1!R10C1:R" & I & "C7" ActiveWorkbook.Names.Add _ Name:="BC_XXXTmp", _ RefersToR1C1:=sTmp ActiveCell.Offset(0, 2).Columns("A:D").EntireColumn.Select Selection.Replace _ What:=" hrs", _ Replacement:="", _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ MatchCase:=False Selection.Replace _ What:=" hr", _ Replacement:="", _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ MatchCase:=False Application.Goto Reference:="BC_XXXTmp" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing into excel PROBLEMS | Excel Worksheet Functions | |||
Importing Alan Beban's code on Arrays; Importing a module or a project | Excel Worksheet Functions | |||
Importing problems | Excel Discussion (Misc queries) | |||
importing list with commas from WORD, to individual .xls cells? | Excel Discussion (Misc queries) | |||
Problems Importing from Access | Excel Discussion (Misc queries) |