Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CC CC is offline
external usenet poster
 
Posts: 91
Default IF Function and msgbox

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF Function and msgbox

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CC CC is offline
external usenet poster
 
Posts: 91
Default IF Function and msgbox

Hi Toopers

I have this error msg


"Sub or Function not defined"

CC



"Toppers" wrote:

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF Function and msgbox

sorry ..... put

msgbox application.max(calc1,calc2) & "is the biggest!"


"CC" wrote:

Hi Toopers

I have this error msg


"Sub or Function not defined"

CC



"Toppers" wrote:

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CC CC is offline
external usenet poster
 
Posts: 91
Default IF Function and msgbox

It's great Toopers
Thanks a lot

One more thing ... How can I put name instead of number

(eg Material A is the bigest)

cc

"Toppers" wrote:

sorry ..... put

msgbox application.max(calc1,calc2) & "is the biggest!"


"CC" wrote:

Hi Toopers

I have this error msg


"Sub or Function not defined"

CC



"Toppers" wrote:

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF Function and msgbox

How do we identify Material A? Is it an a cell?

If Calc1Calc2 then
msgbox "Material A is biggest"
else
msgbox "Material B is biggest"
End if


Or

If Calc1Calc2 then
msgbox range("A1") & " is biggest"
else
msgbox range("A2") & " is biggest"

End if

A1 contains "Material A", A2 contains "Material B"

HTH

"CC" wrote:

It's great Toopers
Thanks a lot

One more thing ... How can I put name instead of number

(eg Material A is the bigest)

cc

"Toppers" wrote:

sorry ..... put

msgbox application.max(calc1,calc2) & "is the biggest!"


"CC" wrote:

Hi Toopers

I have this error msg


"Sub or Function not defined"

CC



"Toppers" wrote:

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CC CC is offline
external usenet poster
 
Posts: 91
Default IF Function and msgbox

Many Thanks Toopers

Look so easy when we Know ....

cc

"Toppers" wrote:

How do we identify Material A? Is it an a cell?

If Calc1Calc2 then
msgbox "Material A is biggest"
else
msgbox "Material B is biggest"
End if


Or

If Calc1Calc2 then
msgbox range("A1") & " is biggest"
else
msgbox range("A2") & " is biggest"

End if

A1 contains "Material A", A2 contains "Material B"

HTH

"CC" wrote:

It's great Toopers
Thanks a lot

One more thing ... How can I put name instead of number

(eg Material A is the bigest)

cc

"Toppers" wrote:

sorry ..... put

msgbox application.max(calc1,calc2) & "is the biggest!"


"CC" wrote:

Hi Toopers

I have this error msg


"Sub or Function not defined"

CC



"Toppers" wrote:

msgbox max(calc1,calc2) & "is the biggest!"

where calc1=material A 2000 litrs * dens 1.3 = 2600 kg
calc2=material B 1000 litrs * dens 1.3 = 1300 kg

HTH

"CC" wrote:

Gentle people


I'm a beginner... real beginner .. and I have this problem
I have two inpuBox with two questions about the amount of materials ( eg.
amount of Material A and Amount of Material B)
then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg
and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a
Msgbox show the bigest

Can you hlp ?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does this function NOT return a value? Nooby Excel Discussion (Misc queries) 3 May 22nd 06 03:07 PM
Changing worksheet cells from within a function James4U2enjoy Setting up and Configuration of Excel 1 October 14th 05 02:16 PM
macro to run series of reports to PDF Marc Bobrow Excel Worksheet Functions 5 May 13th 05 02:39 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
Counting Function Dilemma Simon Lloyd Excel Worksheet Functions 0 November 8th 04 03:13 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"