Search : in
By :

Compare cell Values

Last answer on Jul 15, 2009 12:45:52 pm BST Vba Beginner, on Jul 14, 2009 11:07:43 am BST 
 Report this message to moderators

Hello,

i want to compare the Content of 2 Cells And Replace the value of the cell with the lowest value. like this

cell A1 got a value of 21 and Cell B1 got a value of 32

then i want cell B1 to stay as it is And Change The value of A1 for 21 to 32

any easy way to do this With VBA,? because im gonna use it in a Macro.

Thanks.

Best answers for « Compare cell Values » in :
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
[VBA] Detecting changes in cell Show[VBA] Detecting changes in cell The Event Change feature of a sheet will detects the change in the active cell but it gives no information about the content. The example given below will help you to find out if the cell was changed,...
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Download CFG Commercial Real State Calculator ShowCFG Commercial Real State Calculator is a calculator for managing your finance. The machine is equipped with many analysis tools like the calculation of amortization values, rate return, loan comparison, future values and much more. It is both an...
Spreadsheets - Cell Selection ShowCell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. Line Selection An entire line can be chosen by clicking directly on the line...

1

 venkat1926, on Jul 15, 2009 12:45:52 pm BST
  • +2

Try this macro and post feedback

Sub test()
Dim m As Double, n As Integer, p As Double
m = WorksheetFunction.Min(Range("a1"), Range("B1"))
n = WorksheetFunction.Match(m, Range("a1:B1"), 0)
p = WorksheetFunction.Max(Range("A1"), Range("B1"))
Cells(1, n) = p


End Sub

Reply to venkat1926