Re: Excel
Re: Excel
- Subject: Re: Excel
- From: Deivy Marck Petrescu <email@hidden>
- Date: Mon, 9 Feb 2009 18:44:53 -0500
On Feb 9, 2009, at 5:10 PM, Thomas Maffucci wrote:
Deivy Marck Petrescu wrote:
Actually, it is irrelevant what would be in T2:U6 in my examples.
But, so it might be easy to clarify,
LOOKUP(CELL, TABLE, VECTOR) means lookup where would cell be in
>the table and
return the value from the vector
I use that to assign grades.
Say that 0-50 gets an F, 50-70 a D, 70-80 a C, 8 -90 a B and 90+
>an A,
T2:T6 would be 0, 50, 70, 80, 90 U2 to U6 would be F,D,C,B,A
Now if CELL is a value less than 50, the vector (U2:U6) returns F,
less than 80 but more than 70, it returns B.
Thanks Deivy,
--set AC84 to (ASCII character (84))
--set AC85 to (ASCII character (85))
set frw to 2
set lrw to 6
set Fclm to "T"
set Lclm to "U"
--set part1 to "(RC[-1]," & (AC84 & "2:" & AC85 & "6") & "," & (AC85
& "2:"
& AC85 & "6)")
set part1 to "=Lookup" & "(R3," & Fclm & frw & ":" & Lclm & lrw &
"," & Lclm
& frw & ":" & Lclm & lrw & ")"
--set part1 to "(R3," & (AC84 & "2:" & AC85 & "6") & "," & (AC85 &
"2:" &
AC85 & "6)")
--set part1 to (part1 as string)
--return (part1)
tell application "Microsoft Excel" to set value of cell "S3" to part1
--->=Lookup(R3,T2:U6,U2:U6)
When I add your Table data,
The Formula above works fine under Excel 2008
Hi Thomas,
First, there is really no difference between AC84 and "T". you can ask
AS and you will see.
What you found out is that if you use "R3" instead of "RC[-1]" it
will work. That is excel will not put the single quotes around the
letters.
I still believe there is a bug with excel, and it should not put the
quotes either way.
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Re: Excel (From: Thomas Maffucci <email@hidden>) |