You are here:

Excel/formula/statement to check a cell


How do I write a formula/statement to check a cell (call it D2 then check another cell call it G2) then have the contents of G2 moved to D2 if G2 is a higher number value?
Iím trying to come up with a way to show the current value in D2 unless G2 is increased by the percentage in P1 (which changes every other year (and dictated by someone else)).
I want to be able to insert the percent of change and have the spreadsheet populate the proper numbers in the proper cells.    

Thanks, Jon

Well, I wouldn't replace the initial value, but you can compare two values and decide which one to use with the IF() function:

=IF(D2>G2, D2, G2)

See this video for details: IF FUNCTION

Be sure to visit my web site and watch my FREE 90-minute Microsoft Excel Video Tutorial

Richard Rost
Microsoft MVP
Computer Learning Zone  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Richard Rost


I am the author of The Complete Idiot's Guide to Excel 2010.

I am happy to answer any questions about Microsoft Excel. If you have an Excel problem, let me help you with it. Also, please be sure to check the Excel Tips & Tricks and Excel Tutorials sections of my web site.

You can also watch my complete Excel 2010 For Beginners tutorial online which is over 90 minutes of FREE videos and an eBook.


I have been using Microsoft Excel since the very early Windows 3.1 versions. I have been teaching Microsoft Excel in the classroom since 1994, and online through computer tutorials since 2002.

I have been volunteering on AllExperts in the categories of Microsoft Access, Visual Basic, and Weight Loss for years.

I am the author of The Complete Idiot's Guide to Excel 2010. I have created a line of computer tutorials online at and

Personally, I am self taught. I've learned everything I know from books and trial & error. If I don't know the answer, I know how to find it.

Past/Present Clients
I have over 20,000 happy clients worldwide.

©2017 All rights reserved.

[an error occurred while processing this directive]