View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default STILL DESPERATE FOR HELP!!!


LastRow = Range("B" & Rows.count).end(xlup).Row
Rating = 0
for RowCount = 2 to LastRow
if A2 = Range("B" & Rowcount) and _
A2 <= Range("C" & Rowcount) then

Rating = Range("D" & Rowcount)
exit for
end if
next RowCount
"edm1007" wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks