Grade compare two non blank cells with alphabets and report trend

ukbulldog001

New Member
Joined
Jul 8, 2015
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
Dear MrExcelites,

Greetings, I need a formula to compare the last and the last second cell and report whether it has increased or decreased or stays the same.

Grade Table:

Book1
BCDEFGHIJKLM
1JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
2BB
Sheet1


Used below formula, but with error.
Trend Result:

Book1
P
1TREND
2#VALUE!
Sheet1
Cell Formulas
RangeFormula
P2=IF(OFFSET(B2:M2,0,COUNTA(B2:M2)-2,1,1)B2:M2,0,COUNTA(B2:M2)-2,1,2),"ê",IF(OFFSET(B2:M2,0,COUNTA(B2:M2)-2,1,1)>OFFSET(B2:M2,0,COUNTA(B2:M2)-2,1,1),"é","n"))


Char used alt codes in formula:

Book1
PQR
4CHAR MAP USEDCHARUsed for
5ALT+0233 for increment
6ALT+0234 for decrement
7nn for equal
Sheet1


will be using wingding format in the resulting cell.

A simple formual would be:

Book1
R
1TREND
2n
Sheet1
Cell Formulas
RangeFormula
R2=IF(F2F2>G2,"é","n"))


but I need it to compare last two non blanks in a year.

PS: tried using aggregate, index too but didnt succeed.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Consider:

=CHOOSE(SIGN(LOOKUP(2,1/(B2:M2<>0),B2:M2)-LOOKUP(2,1/(B2:M2<>0),A2:L2))+2,"ê","n","é")

This assumes there are no gaps between the last and second to last values.
 
Upvote 0
Sorry, I missed that you are using letters instead of numbers, try:

=CHOOSE(SIGN(CODE(LOOKUP(2,1/(B2:M2<>0),B2:M2))-CODE(LOOKUP(2,1/(B2:M2<>0),A2:L2)))+2,"ê","n","é")
 
Last edited:
Upvote 0
Sorry, I missed that you are using letters instead of numbers, try:

=CHOOSE(SIGN(CODE(LOOKUP(2,1/(B2:M2<>0),B2:M2))-CODE(LOOKUP(2,1/(B2:M2<>0),A2:L2)))+2,"ê","n","é")

Thanks a lot @eric-w works perfectly.
:smile:
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top