Remember Me?

 annae Junior Member First recorded activity by ExcelBanter: Sep 2019 Posts: 1 IF function problem,

I'm trying to calculate a maximum amount of value. That is, if a value is higher than 50000, it needs to display 50000. If not, display current value.

A1=35678
B1 should display 35678 (that is, equal to A1)

A1=67980
B1 should display 50000

Last edited by annae : September 13th 19 at 02:33 PM September 13th 19, 02:52 PM posted to microsoft.public.excel.worksheet.functions
 Claus Busch external usenet poster First recorded activity by ExcelBanter: Apr 2011 Posts: 3,729 IF function problem,

Hi,

Am Fri, 13 Sep 2019 14:23:26 +0100 schrieb annae:

I'm trying to calculate a maximum amount of value. That is, if a value
is higher than 50000, it needs to display 50000. If not, display current
value.

A1=35678
B1 should display 35678 (that is, equal to A1)

A1=67980
B1 should display 50000

try:
=MIN(A1,50000)

Regards
Claus B.
--
Windows10
Office 2016 September 18th 19, 05:32 PM posted to microsoft.public.excel.worksheet.functions
 Nasser Saadi external usenet poster First recorded activity by ExcelBanter: Sep 2019 Posts: 2 IF function problem,

On Friday, September 13, 2019 at 4:49:08 PM UTC+3, annae wrote:
I'm trying to calculate a maximum amount of value. That is, if a value
is higher than 50000, it needs to display 50000. If not, display current
value.

A1=35678
B1 should display 35678 (that is, equal to A1)

A1=67980
B1 should display 50000

--
annae

Public Sub Answeer1()
' Date: 2019-Sep-19
' Address: Iraq (Or Arbil Or Irbil)
' ------------------------
Dim A1, B1 As Integer:
A1 = 23445
B1 = IIf(A1 = 50000, 50000, A1)
MsgBox " A1= " & A1 & " B1= " & B1 ' we can use one of display (Msgbox or Print)
Print " A1= " & A1 & " B1= " & B1 ' we can use one of display (Msgbox or Print)

End Sub September 18th 19, 05:36 PM posted to microsoft.public.excel.worksheet.functions
 Nasser Saadi external usenet poster First recorded activity by ExcelBanter: Sep 2019 Posts: 2 IF function problem,

On Friday, September 13, 2019 at 4:49:08 PM UTC+3, annae wrote:
I'm trying to calculate a maximum amount of value. That is, if a value
is higher than 50000, it needs to display 50000. If not, display current
value.

A1=35678
B1 should display 35678 (that is, equal to A1)

A1=67980
B1 should display 50000

--
annae

Public Sub Answeer1()
' Date: 2019-Sep-19
' Address: Iraq (Or Arbil Or Irbil)
' ------------------------
Dim A1, B1 As Integer:
A1 = 23445
B1 = IIf(A1 = 50000, 50000, A1)
' we can use one of display (Msgbox or Print)
MsgBox " A1= " & A1 & " B1= " & B1
Debug.Print " A1= " & A1 & " B1= " & B1

End Sub September 18th 19, 06:54 PM posted to microsoft.public.excel.worksheet.functions
 Benoît external usenet poster First recorded activity by ExcelBanter: Jun 2019 Posts: 6 IF function problem,

On Friday, September 13, 2019 at 4:49:08 PM UTC+3, annae wrote:
I'm trying to calculate a maximum amount of value. That is, if a value
is higher than 50000, it needs to display 50000. If not, display current
value.

A1=35678
B1 should display 35678 (that is, equal to A1)

A1=67980
B1 should display 50000

B1 = IIf(A1 = 50000, 50000, A1)

Formula in B1: =if(A150000,50000,A1)

Just one "i" --
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez lui à leraillez.com

 Thread Tools Search this Thread Show Printable Version Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Similar Threads Thread Thread Starter Forum Replies Last Post Sue New Users to Excel 9 June 19th 09 02:46 PM Raj[_2_] Excel Worksheet Functions 4 April 20th 09 11:07 AM sgreene Excel Worksheet Functions 12 April 17th 08 11:19 PM DEI Excel Discussion (Misc queries) 3 August 9th 06 08:08 PM cuboid Excel Programming 2 January 28th 05 06:09 PM

All times are GMT +1. The time now is 11:20 PM. Copyright ©2004-2019 ExcelBanter.