Formula for highlighting number that decrease cell by cell and percentage difference of each cell

excelrater

New Member
Joined
May 17, 2019
Messages
21
This is a little hard to explain but I have two things i would like to achieveI am an extreme newbie so any help even written formulas for me to try would be wonderful

1. What I would like to achieve is starting from cell A2 and working to the right of the cell---> to the next cell B2 if the number is higher in A2 then B2 I want it A2 Highlighted by it being highlighted(A2) it means it is larger then B2. Then go on to the next cell B2 and compare it to the cell on the right C2 if B2 is Higher then C2 then I would like B2 highlighted. And the formula going all the way to J2. so A2 see if it is higher then B2 if it is A2 will be highlighted, then the same for B2 see if it is higher then C2 if it is B2 will be highlighted,then the same for C2 see if it is higher then D2 if it is C2 will be highlighted, then the same for D2 see if it is higher then E2 if it is D2 will be highlighted ALL THE WAY TILL J2. I only want the number that is higher to the next cell to be highlighted starting from left to right.

2.and if possible to show the percentage difference of how much more is A2 higher Then B2 etc.....

I will upload a blank sheet and a sheet where i would like the formula to highlight

any help will be much appreciated.
A2 B2 C2 D2 E2 F2 G2 H2 I2 J2
1. 1089521876191572320362712171594580125924943508109115142496
2. 136694430869692939202550600641180249853769350-5000
3.1599596971517144205283-7195043082535-620273205515222592264325-273826
4. -257062-707224-109865-138332-140853-52331-76367-38930-2988-26591
5. 0000000000
6. 0000000000
7.-1594985-1519345-887009-926182-527912-238779-234317-199310-2988-26591
8. 0-152060-137265-85178830510613380-11750-5000-2227619461

<tbody>
</tbody>

<tbody>
</tbody>
 
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

here is a screeshot it does so
gj3BhCN
me of them properly but for example G2 is highlighted and it shouldnt be because g2 is less than h2
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

gj3BhCN
https://ibb.co/gj3BhCN here is the image after using the formula you made me. it does so
gj3BhCN
me of them properly but for example G2 is highlighted and it shouldnt be because g2 is less than h2
 
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

g2 should be checking cell block h2 and if g2 is higher then it should be highlighted but g2 is actually lower then h2 so it should not be highlighted. Hope you can see what i mean if we can tweak your fomula would be aweosme to make it work or did i do something wrong?
qqq-Capture.jpg
[/URL][/IMG]
 
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

my goal is to only highlight the cell to the left if it is higher then the cell to the right of it for example A2 is higher then B2 so A2 should be highlighted(i need it going from left to right a2 being the furthest to the left then check to right of it which is B2) . Then B2 if higher then C2 then B2 should be Highlighted then continue on the next cell it should be checking is C2 is higher then D2 if it is higher then C2 should be highlighted ETC..
another problem is for example the - numbers for example c12 when it checks with d12 c12(-102060) should be highlighted since it number is higher value then d12(-137265)

hope this helps at what I am trying to do, if not please let me know so i can explain better. :)
 
Last edited:
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

bump please help
 
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

Your OP made it look like your data started in A2, but the pictures look like it starts in B2.

Try this. Do the exact same thing, but adjust the formula to be whatever the first 2 cells on the first row of your data are.

So, if your data starts in B2, then the formula would be, =AND(B2>C2,C2<>"")
 
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

Your OP made it look like your data started in A2, but the pictures look like it starts in B2.

Try this. Do the exact same thing, but adjust the formula to be whatever the first 2 cells on the first row of your data are.

So, if your data starts in B2, then the formula would be, =AND(B2>C2,C2<>"")

lrobbo314 it worked thank you sooooooooooooooooooooooooo much for helping me thank you thank you thank you, is there way to make the percentage difference show in the cell that are higher?
 
Upvote 0
Re: Hello Need Help formula for highligting number that decrease cell by cell and percentage difference of each cell

Not sure exactly what you're looking for. The value has to be in the cell already, so displaying the percentage difference in the cell itself doesn't seem possible. Here is one possible solution. It's a VBA solution, so right click on the sheet tab, the area with the sheet name, and click 'View Code'. Then paste the code below. It gives the percentage difference in the status bar on the bottom of the screen.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:J9")) Is Nothing Then 'change this range to where your data is
    Application.StatusBar = Format(Target.Value / Target.Offset(, 1).Value, "#.00%")
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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