If/Countif

Fazila

Board Regular
Joined
Nov 19, 2014
Messages
163
I need a formula that compares two columns and tells me if a grade has gone up, down or stayed the same. The table I am trying to populate is similar to the one below:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]Grade[/TD]
[TD]Year 10 TA4[/TD]
[TD]Year 11 TA1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]=sum(countif(index(rawdata,,match(h1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[TD]=sum(countif(index(rawdata,,match(i1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[TD]Up[/TD]
[TD]Wherever there is a grade 9+, 9 or 9- in column H I want to know if the grade in the same row as has gone up i.e. 9 becomes 9+ or -9 becomes 9, gone down or stayed the same. I have converted the + and - to numbers[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Same[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Down[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][TABLE="width: 500"]
<tbody>[TR="class: grid"]
[TD]=sum(countif(index(rawdata,,match(h1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]=sum(countif(index(rawdata,,match(i1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[TD]Up[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Same[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Down[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][TABLE="width: 500"]
<tbody>[TR="class: grid"]
[TD]=sum(countif(index(rawdata,,match(h1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]=sum(countif(index(rawdata,,match(i1,rawdataheadings,0)),{"9+","9","-9"}))[/TD]
[TD]Up[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Same[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Down[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Hope this makes sense if anyone can think of a formula that would be really useful.

Thanks
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
As a workaround I have created a helper column on my raw data sheet for Up, Down and Same and used this formula:

=COUNTIFS(INDEX(RawData,,MATCH($N$1,RawDataHeadings,0)),">=8.67",INDEX(RawData,,MATCH($P$1,RawDataHeadings,0)),U9)

However, if anyone knows a way without using a helper column that would be great.

Thanks

Fazila
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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