Grade compare two non blank cells with alphabets and report trend

ukbulldog001

New Member
Joined
Jul 8, 2015
Messages
23
Office Version
  1. 2021
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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.
:)
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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