If Formula with a "BUT"

pigsfoot

Board Regular
Joined
Dec 13, 2007
Messages
58
Office Version
  1. 365
HI, Apologies for subject title but not really sure how to explain what i'm looking to do in a different way.

This is an extract of some of the sheet

GPS Match to GEO.xlsx
ABCDEFGHIJK
1
2Min GPS Match to GEO0.39
3Avg % based on total cell count43%
4Total cells with data18
5GEOActual GPSEst GPS based on min req.%Diff using min req. algorithumGPS with Avg % Uplift AND Min 1/3 matchDiff between Calculated GPS and GEO
601-Jul-22Friday118353746160%6618-5217
702-Jul-22Saturday11827279146130%6614-5213
803-Jul-22Sunday695777292713-10%3890-3067
904-Jul-22Monday101036782394049%9725-378
1005-Jul-22Tuesday95098115370917%116362127
1106-Jul-22Wednesday94438525368311%122242781
1207-Jul-22Thursday123337656481061%10978-1355
1308-Jul-22Friday105187484410241%10731213
Loughborugh
Cell Formulas
RangeFormula
G3G3=SUM(H6:H36)/G4
G4G4=COUNTIF(H6:H36,">0")
J6:J13J6=IF(H6>0,(E6*$G$3)+E6,(F6*$G$3+F6))
K6:K13K6=J6-D6
F6:F13F6=D6*$G$2
H6:H13H6=IF(E6>F6,(D6-E6)/E6,0)


Basically I am looking to work out an average % increases as per column J which is based on an If statement that uses actual data if the min requirement is reached which is GPS number has to be a minimum of 39% of the GEO data, if not we based the % uplift on the estimated number ( column F ). However.... some times the GPS data is more than GEO as per row 8.. in this case i want to use the actual GPS number.

So in human terms i need an If statement that does what its currently doing with a "but" at the end that says if the GPS number is more than GEO use that instead... this formula would replace the current one used in column J

Hopefully that makes sense
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
how about
=IF(H6>0,(E6*$G$3)+E6,(F6*$G$3+F6))

=IF( E6>D6, E6, IF(H6>0,(E6*$G$3)+E6,(F6*$G$3+F6)))

some times the GPS data (Column E ) is more than GEO (Column D) as per row 8.. in this case i want to use the actual GPS number.
I think thats what you mean - BUT I maybe wrong , as not clear what cells we are looking at
 
Upvote 0
Solution
@etaf That works perfectly thank you, still trying to wrap my head around what the formula does but its working just the way i need it to. Thanks for your help.
 
Upvote 0
the IF() works like
Left to right
IF ( TEST , do if TRUE , do if FALSE )
then you can nest a formula
IF( TEST , do if TRUE , now for the FALSE part of the test , add IF( TEST , if TRUE , if FALSE ))
and so on

so first we test to see if E6 is greater than D6 - if its true , then use the contents of cell D6 - if its false then go to the next section after the comma ,
which we have another IF ()
so execute that IF ()
Is H6 > 0 - if it is then do the true part ,(E6*$G$3)+E6
if its not TRUE then do the FALSE part
,(F6*$G$3+F6

does that help at all - if not i can try to explain again , if you let me know which bit is not clear
 
Upvote 0
Very helpful, thank you @etaf. That explanation make it very clear and actually very simple to understand. Much appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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