Find last value in row that is not a percentage value

IanPM

Board Regular
Joined
Dec 12, 2013
Messages
53
[TABLE="class: grid, width: 600, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Price 2017
[/TD]
[TD]Price 2018
[/TD]
[TD]Price 2019/01
[/TD]
[TD]Price change
[/TD]
[TD]Price 2019/02
[/TD]
[TD]Price change
[/TD]
[TD]Price 2019/03
[/TD]
[TD]Price change
[/TD]
[TD]Price 2019/04
[/TD]
[TD]Price change
[/TD]
[TD]Price 2019/05
[/TD]
[TD]Price change
[/TD]
[TD]Price 2019/06
[/TD]
[TD]Price change
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]20
[/TD]
[TD]22
[/TD]
[TD]23
[/TD]
[TD]4.5%
[/TD]
[TD]25
[/TD]
[TD]8.7%
[/TD]
[TD]25
[/TD]
[TD]0.0%
[/TD]
[TD]25
[/TD]
[TD]0.0%
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]20
[/TD]
[TD]22
[/TD]
[TD][/TD]
[TD]0.0%
[/TD]
[TD][/TD]
[TD]0.0%
[/TD]
[TD][/TD]
[TD]0.0%
[/TD]
[TD]25
[/TD]
[TD]13.6%
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I need the price changes to calculate of the last price value. Data example
In Row 2 the price changed 4.5% from 2019/01 to 2018 & 8.7% in 2019/02 from 2019/01
In row 3 the first price change in column I - 2019/04 at 13.6%.

Question what formula can I use the find the last value which is 22 in 2018 (column B ) & exclude all the percentages?

Thank you

IanPM
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi Ian,

Just to clarify - would you like to find out what is the most recent price for each row?

For example: row 2 = 25, row 3 = 25
 
Upvote 0
Hi

Not quite
In Row to calculate the percentage in column F it needs to find 23 (column C ).
In row 3 to calculate the percentage in column J it needs to find 22 ( Column B)
I am looking for the last available price that excels the percentages
 
Upvote 0
Ahh I think I know what you mean.

You can use the following formula in cell J3 (row 3, price change for 2019/04):

Code:
=1-(SUMPRODUCT(INDEX($A$3:$H$3,1,MAX(IF($A$3:$H$3>1,COLUMN($A$3:$H$3)))))/I3)

Please note that this is an array formula, so it needs to be entered using Ctrl+Shift+Enter. The result will be 12% (which is different to your 13.6% - not sure how this one is calculated).

This is the most crucial part (also an array formula):
Code:
=SUMPRODUCT(INDEX($A$3:$H$3,1,MAX(IF($A$3:$H$3>1,COLUMN($A$3:$H$3)))))

It finds the latest non-percentage value in cells A3:H3. I simply check if a given value is less than 1 in order to evaluate this condition (check if it works fine for your data set). In order to test it simply add/delete other quarterly values (cells C3, E3, G3) and see how the value changes.

Hope it helps.
 
Upvote 0
Hi

Thankyou

However the array is giving a #value ! error, somehow the formula is detecting some kind text.

Do you have any ideas?
 
Upvote 0
Something like that should ignore text values (also an array formula -> Ctrl+Shift+Enter):

Code:
=SUMPRODUCT(INDEX($A$3:$H$3,1,IF(ISNUMBER($A$3:$H$3),MAX(IF($A$3:$H$3>1,COLUMN($A$3:$H$3))))))
 
Upvote 0
Does this do what you want?
D2 is copied down then column D formulas copied to columns F, H, J, etc

Excel Workbook
ABCDEFGHIJK
1Price 2017Price 2018Price 2019/01Price changePrice 2019/02Price changePrice 2019/03Price changePrice 2019/04Price changePrice 2019/05
22022234.5%258.7%250.0%250.0%
320222513.6%
4
Price Change
 
Last edited:
Upvote 0
Hi

No I want to find the first non percentage value from previous month's to evaluate the current month price change.
Example J3 must find the last available price which is 22 in B3. The it will do 25/22-1 ( I3/B3-1 )
So the headers are not to be used
The previous array formulas seemed to be on face value it just gave a value error
 
Upvote 0
Hi

No I want to find the first non percentage value from previous month's to evaluate the current month price change.
Example J3 must find the last available price which is 22 in B3. The it will do 25/22-1 ( I3/B3-1 )
So the headers are not to be used
The previous array formulas seemed to be on face value it just gave a value error
Who are you addressing here?
25/22-1 = 13.6% by my calculation - which is what my formula is showing.
 
Upvote 0
Hi Peter

If put this formula: =IF(C2="","",(C2-MAXIFS($A2:B2,$A$1:B$1,"<>Price Change"))/MAXIFS($A2:B2,$A$1:B$1,"<>Price Change")) in cell D2 I get a name error. If I use the formula supplied by Justyna I get a value error
 
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