<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am pretty new to python (which you will see by 
the code I am about to paste in here), and I am needing help with a script that 
will gather a cell's contents and use that information to create new data in a 
new cell. I need this done for an entire column. I can do it with one cell at a 
time, but what is the point in doing that? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The part I am having trouble with is being able to 
increment rows. And now with my script that I have it just runs in some loop 
that brings my machine to the ground.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is what I have:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#RBOC-NonRBOC rates<BR>#RBOC is .0029 and nRBOC is 
.0042<BR>from win32com.client import Dispatch<BR>xlApp = Dispatch 
("Excel.Application")<BR>def getCell(sheet, row ,col):<BR>    
"Get value of one cell"<BR>    sheet = 
xlApp.ActiveWorkbook.ActiveSheet<BR>    return sheet.Cells(row, 
col).Value<BR>def setCellNonRBOC(sheet, row, col):<BR>    "set 
value of one cell"<BR>    sheet = 
xlApp.ActiveWorkbook.ActiveSheet<BR>    sheet.Cells(row, 
col).Value = ".0042"<BR>def setCellRBOC(sheet, row, col):<BR>    
"set value of one cell"<BR>    sheet = 
xlApp.ActiveWorkbook.ActiveSheet<BR>    sheet.Cells(row, 
col).Value = ".0029"<BR>Range = 
xlApp.ActiveWorkbook.ActiveSheet.Range("B2:B5")<BR>sheet = 
xlApp.ActiveWorkbook.ActiveSheet<BR>row = 2<BR>while len(Range.Value) > 
0:<BR>    getCell(sheet, row, 2)<BR>    if 
sheet.Cells.Value == 'Non-RBOC':<BR>        
setCellNonRBOC(sheet, row, 8)<BR>        row 
= row + 1<BR>    elif sheet.Cells.Value == 
'RBOC':<BR>        setCellRBOC(sheet, row, 
8)<BR>        row = row + 1<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>The script needs to analyze cell B2 through cell 
B51290 (the entire range). And then for each cell it analyzes put either ".0029" 
or ".0042" in column 8.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Help me please!!!</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Clayton </FONT></DIV></BODY></HTML>