Excel Questions


tell application "Microsoft Excel"
	activate
	set EndDate to active cell
	set Release to (get offset EndDate column offset -3)
	select range Release:EndDate
	activate
end tell

So the thing that does not seem to work is setting Ranges with variables. Can anyone make a suggestion on that?

That was very helpful thank you. And with a little tweak I am accomplishing basically the engine part of what I want to do. There is a lot of overhead though, perhaps someone can help me consolidate. Basically I have 3 products with 11 processes, each product has the same structure with slightly variable timelines. The way that I am approaching this right now I will have about 156 lines of code to just define the products with timelines. Obviously there are more parts to this script, I am just doing it one step at a time.


tell application "Microsoft Excel"
	
	set EndDate to active cell
	set color index of interior object of EndDate to 54
	
	set CliApF to get address of (get offset of EndDate column offset -1)
	set CliAp1 to get address of (get offset EndDate column offset -2)
	set ClientApp to range (CliAp1 & ":" & CliApF)
	set color index of interior object of ClientApp to 34
	set cliapp1 to (get offset EndDate column offset -2)
	
	set R2F to get address of (get offset cliapp1 column offset -1)
	set R21 to get address of (get offset cliapp1 column offset -3)
	set Route2 to range (R21 & ":" & R2F)
	set color index of interior object of Route2 to 37
	set rt21 to (get offset EndDate column offset -6)
	
	set CliR4F to get address of rt21
	set CliR41 to get address of (get offset rt21 column offset -2)
	set ClientRev4 to range (CliR41 & ":" & CliR4F)
	set color index of interior object of ClientRev4 to 25
	set clirev41 to (get offset EndDate column offset -9)
	
	set R1F to get address of clirev41
	set R11 to get address of (get offset clirev41 column offset -3)
	set Route1 to range (R11 & ":" & R1F)
	set color index of interior object of Route1 to 41
	set rt11 to (get offset EndDate column offset -13)
	
	set CliR3F to get address of rt11
	set CliR31 to get address of (get offset rt11 column offset -6)
	set ClientRev3 to range (CliR31 & ":" & CliR3F)
	set color index of interior object of ClientRev3 to 11
	set clirev31 to (get offset EndDate column offset -20)
	
	set CRe3F to get address of clirev31
	set CRe31 to get address of (get offset clirev31 column offset -1)
	set Creative3 to range (CRe31 & ":" & CRe3F)
	set color index of interior object of Creative3 to 6
	set cre311 to (get offset EndDate column offset -22)
	
end tell

Once I figure out what Jacques has done here exactly; this appears to be exactly what I am looking for, and also addresses one of the next steps in what I am building. I am still trying to sort out the cell addressing syntax of Excel. Thanks for the input this is way more efficient. Can some one recommend a good place to get more info or a tutorial on using lists?

Thanks
Chad