Clarification of Question by
celiasocelia-ga
on
02 Apr 2006 08:59 PDT
Good idea. Here is the code. This works for the first line but that's
it. I need to get it to work on subsequent rows in the spreadsheet.
Regarding the price... I've never used this service before and I was
basing the price on a similar question that was answered. I'm willing
to pay a fair price but honestly I don't know what a fair price is for
this.
Maybe a more straightforward question would be: how can I take the
current code (shown below) and have it loop through all the rows on
the spreadsheet? Thanks!
Sub Automate_First_Row()
'
' Insert 11 columns
Columns("A:K").Select
Selection.Insert Shift:=xlToRight
Range("A1").Select
'
' Put formulas into the first row of the spreadsheet
Range("A2").Select
ActiveCell.FormulaR1C1 = "=SEARCH("", "",RC[15])+2"
Range("B2").Select
ActiveCell.FormulaR1C1 = "=SEARCH(RC[3],RC[14])"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISERROR(RC[-2]),"""",PROPER(MID(RC[13],RC[-2],RC[-1]-RC[-2])))"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISERROR(RC[-3]),"""",PROPER(LEFT(RC[12],RC[-3]-3)))"
Range("E2").Select
ActiveCell.FormulaR1C1 = "=IF(ISERROR(RC[-4]),"""",RIGHT(RC[11],3))"
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISERROR(RC[-5]),PROPER(RC[10]),RC[-3]&"" ""&RC[-2]&"", ""&RC[-1])"
Range("G2").Select
ActiveCell.FormulaR1C1 = "=PROPER(RC[11])"
Range("H2").Select
ActiveCell.FormulaR1C1 = "=PROPER(RC[9])"
Range("I2").Select
ActiveCell.FormulaR1C1 = "=PROPER(RC[10])"
Range("J2").Select
ActiveCell.FormulaR1C1 = "=RC[10]"
Range("K2").Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[10],5)&""-""&RIGHT(RC[10],4)"
End Sub