Return an amount with a criteria

Marwan69

Board Regular
Joined
Mar 14, 2018
Messages
80
Hello everyone and please pay a smile when you work this because it's a pain...

I have a table and I'd like to return an amount based on criteria. Let me explain below:
[TABLE="width: 417"]
<tbody>[TR]
[TD]Financial Figures (SR'000)[/TD]
[TD]Salama[/TD]
[TD]Yearly Change(%)[/TD]
[/TR]
[TR]
[TD]Cash & Cash Equivalents[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2013[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Insurance Operations(Takaful Operations)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cash on hand and at banks[/TD]
[TD]36,465[/TD]
[TD]-35.35%[/TD]
[/TR]
[TR]
[TD]Term deposits - (<= 3 mos)[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Term deposits - (>3<12 mos)[/TD]
[TD]10,576[/TD]
[TD]190.65%[/TD]
[/TR]
[TR]
[TD]Shareholders' Operations[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cash on hand and at banks[/TD]
[TD]33[/TD]
[TD]16639.39%[/TD]
[/TR]
[TR]
[TD]Term deposits - (<= 3 mos)[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Term deposits - (>3<12 mos)[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2014[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Insurance Operations(Takaful Operations)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cash on hand and at banks[/TD]
[TD]23,573[/TD]
[TD]-88.58%[/TD]
[/TR]
[TR]
[TD]Term deposits - (<= 3 mos)[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Term deposits - (>3<12 mos)[/TD]
[TD]30,739[/TD]
[TD]-64.34%[/TD]
[/TR]
[TR]
[TD]Shareholders' Operations:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cash on hand and at banks[/TD]
[TD]5,524[/TD]
[TD]-99.86%[/TD]
[/TR]
[TR]
[TD]Term deposits - (<= 3 mos)[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I'd like the formula to return -35.35% under (Yearly change%) column but based on the following criteria:
I want the formula to read this criteria:(Insurance Operations(Takaful Operations)) and this criteria: (Cash on hand and at banks) and therefore return to me the (Yearly change%). Hope is clear.

Why is that? Because I have two operations: (Insurance operations(Takaful Operations) and (Shareholders' Operations). I want first to return the yearly change% pertaining to insurance operations and then jump to shareholders' operations.

I wish this didn't cause pain to you guys!!!Many thanks,
Marwan
 
Last edited:

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
can you provide us with the numbers that returned 35.35%, because your criteria appears on a number of lines ???
 
Upvote 0
Yes of course and thanks for replying bro.

- 35.35% is a product of dividing Cash on hand and at banks of 23,573/36,465-1

Many thanks,
Marwan
 
Last edited:
Upvote 0
You seem to have answered your own question....why don't you simply do what you have described ??

Excel 2007
ABC
4Insurance Operations(Takaful Operations)
5Cash on hand and at banks36,465-35.35%
6Term deposits - (<= 3 mos)0
7Term deposits - (>3<12 mos)10,576190.65%
8Shareholders' Operations
9Cash on hand and at banks3316639.39%
10Term deposits - (<= 3 mos)0
11Term deposits - (>3<12 mos)0
122014
13Insurance Operations(Takaful Operations)
14Cash on hand and at banks23,573-88.58%
15Term deposits - (<= 3 mos)0
16Term deposits - (>3<12 mos)30,739-64.34%
17Shareholders' Operations:
18Cash on hand and at banks5,524-99.86%
19Term deposits - (<= 3 mos)0
Sheet1
Cell Formulas
RangeFormula
C5=B14/B5-1
 
Last edited:
Upvote 0
Hello Michael M.

I didn't get that and I still can't see how this can be done. I'll explain again in a simple way hopefully and I know this is quite confusing.
I have two portfolios, right? one is called:Insurance Operations(Takaful Operations), and the other one called: Shareholders' Operations. I want the formula when it runs reads two criterias: The insurance Operations(Takaful Operations) and Cash on hand and at banks, and returns to me the amount(Percentage) which is -35.35%. So that when I drag the formula down the table it only reads the criterea that I specified, and it will not pick the shareholders' Operations.

Hope is clear.

Many thanks,
Marwan
 
Last edited:
Upvote 0
you can't drag a formula down the column and skip certain rows....unless you apply it with VBA !
 
Upvote 0
Thanks Michael M. I mean when I apply the formula it should read only the defined criterea.

Many thanks,
Marwan
 
Upvote 0
Hi Marwan,

So when you get your report, each years data is the same number of rows and layout?
 
Upvote 0
Hi RasGhul.

Let me illustrate:

let's say there's a formula. Say the formula reads as follows (I know it's not true but this was my trial):

=IFERROR(INDEX(I6:I49,MATCH("Cash on hand and at banks",$G$6:$G$49,0)),"")

Where: I6:I49 (Reads the Yearly Change%)
$G$6:$G$49(Reads A4:A...)
and "Cash on hand and at banks": Picks only this text and return the value in the (Yearly Change%).

But again I want also another criterea besides "Cash on hand and at banks" which is: Insurance Operations(Takaful Operations). Why? Because we've got the (Shareholders' Operations) which is not of my interest to pickup its value at this stage.

Guys if this is going to cause you any pain please ignore it and thanks a lot for showing the eager to help, which is the most important thing between us here in just working out a simple formula.

Many thanks,
Marwan

 
Last edited:
Upvote 0
Not sure if this is what you need and assumes that the Cash on hand row ALWAYS follows the "Takaful" or "Shareholders" rows;

Drag down the D1 formula as helper for index & match;

Not the most efficient solution sorry.

Book1
ABCDEF
12013SalamaYearly Change(%)2013
2Insurance Operations(Takaful Operations)2013YEAR2013
3Cash on hand and at banks36,465-35.35%2013CRITERIAInsurance Operations(Takaful Operations)
4Term deposits - (<= 3 mos)02013RESULT-35.35%
5Term deposits - (>3<12 mos)10,576190.65%2013
6Shareholders' Operations2013
7Cash on hand and at banks3316639.39%2013
8Term deposits - (<= 3 mos)02013
9Term deposits - (>3<12 mos)02013
1020142014
11Insurance Operations(Takaful Operations)2014
12Cash on hand and at banks23,573-88.58%2014
13Term deposits - (<= 3 mos)02014
14Term deposits - (>3<12 mos)30,739-64.34%2014
15Shareholders' Operations2014
16Cash on hand and at banks5,524-99.86%2014
17Term deposits - (<= 3 mos)02014
Sheet1
Cell Formulas
RangeFormula
D1=IF(ISNUMBER(A1),A1,OFFSET(A1,-1,3))
F4=OFFSET(INDEX($C$1:$C$17,MATCH(F3&F2,INDEX($A$1:$A$17&$D$1:$D$17,,),0)),1,,)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
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