Hey guys/girls,
My first post!
I was originally trying to run this formula, but found that I couldnt autofill a filtered selection. heres the code:
Maybe looping would be better?
I cant seem to autofill just the filtered choice.
I have about 20 values in Column G, and different data in Column H. Depending on what column G is, a different hyperlink URL has to be applied.
EG.
Cell G2: City Link
Cell H2: 12345
If Cell G2 = City Link, then Column I2 = HYPERLINK("http://www.packagetrackr.com/track/citylink/"&H2&")
Any suggestions would be fantastic!
Thanks guys/girls!
My first post!
I was originally trying to run this formula, but found that I couldnt autofill a filtered selection. heres the code:
Code:
Range("I1").Select ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]=""dpd"",HYPERLINK(""http://www.dpd.co.uk/tracking/quicktrack.do?search.consignmentNumber=""&RC[-1]&""&search.searchType=16&search.javascriptValidated=0&appmode=guest""))"
Range("I1").Select
Selection.AutoFill Destination:=Range("i1:i" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillCopy
Range("I2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1:I1").Select
ActiveSheet.Range("A1:i1").AutoFilter Field:=9, Criteria1:="FALSE"
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(R[-1]C[-2]=""City Link"",HYPERLINK(""http://www.packagetrackr.com/track/citylink/""&R[-1]C[-1]&""""))"
Range("I2").Select
Selection.AutoFill Destination:=Range("i2:i" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillCopy
Range("A1:I1").Select
ActiveSheet.Range("A1:i1").AutoFilter Field:=9, Criteria1:="FALSE"
Range("i2").Select
ActiveCell.FormulaR1C1 = _
"=IF(R[-1]C[-2]=""hermes"",HYPERLINK(""http://www.hermes-europe.co.uk/tracker.html?trackingNumber=""&R[-1]C[-1]&""&Postcode=""&R[-1]C[-4]&R[-1]C[-3]&""""))"
Range("I2").Select
Selection.AutoFill Destination:=Range("i2:i" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillCopy
Maybe looping would be better?
I cant seem to autofill just the filtered choice.
I have about 20 values in Column G, and different data in Column H. Depending on what column G is, a different hyperlink URL has to be applied.
EG.
Cell G2: City Link
Cell H2: 12345
If Cell G2 = City Link, then Column I2 = HYPERLINK("http://www.packagetrackr.com/track/citylink/"&H2&")
Any suggestions would be fantastic!
Thanks guys/girls!