Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 45
Default Check if content in cell is an integer

How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer and
display the necessary in cell C3, check if content in cell A4 when divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 45
Default Check if content in cell is an integer

Hi Mike,

Thank you for the prompt reply. It works just like i want it to.

Prem

"Mike H" wrote:

Try this

=IF(MOD(A2,4)=0,"Integer","No an integer")

Mike

"prem" wrote:

How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer and
display the necessary in cell C3, check if content in cell A4 when divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,533
Default Check if content in cell is an integer

Hi

Enter this formula in C2 and copy it down the desired range.

=IF(MOD(A2;4)=0;150;"NA")

Regards,
Per

"prem" skrev i meddelelsen
...
How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it
is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer
and
display the necessary in cell C3, check if content in cell A4 when
divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 860
Default Check if content in cell is an integer

Hi Prem,

Just expanding on Mike's solution,

This will return 150 as a number
=IF(MOD(A2,4)=0,150,"NA")

And this will return 150 as a text value
=IF(MOD(A2,4)=0,"150","NA")

Grab the fill handle and drag down as far as
is needed.

HTH
Martin


"prem" wrote in message
...
How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it
is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer
and
display the necessary in cell C3, check if content in cell A4 when
divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.



  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,533
Default Check if content in cell is an integer

Just a little typo, use this formula

=IF(MOD(A2,4)=0,150,"NA")

Regards,
Per

"Per Jessen" skrev i meddelelsen
...
Hi

Enter this formula in C2 and copy it down the desired range.

=IF(MOD(A2;4)=0;150;"NA")

Regards,
Per

"prem" skrev i meddelelsen
...
How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it
is
not an integer.

For example, the formula should check if the content A2 divided by 4 is
an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer
and
display the necessary in cell C3, check if content in cell A4 when
divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.





  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 45
Default Check if content in cell is an integer

Hi guys thank you for all the help. Really appreciate it. Its all working
well now. Thank you.

"MartinW" wrote:

Hi Prem,

Just expanding on Mike's solution,

This will return 150 as a number
=IF(MOD(A2,4)=0,150,"NA")

And this will return 150 as a text value
=IF(MOD(A2,4)=0,"150","NA")

Grab the fill handle and drag down as far as
is needed.

HTH
Martin


"prem" wrote in message
...
How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it
is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer
and
display the necessary in cell C3, check if content in cell A4 when
divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.




  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 860
Default Check if content in cell is an integer

Glad it worked for you, thanks for posting back,
I'm sure Mike and Per appreciate it as much as I do.

Regards
Martin



"prem" wrote in message
...
Hi guys thank you for all the help. Really appreciate it. Its all working
well now. Thank you.

"MartinW" wrote:

Hi Prem,

Just expanding on Mike's solution,

This will return 150 as a number
=IF(MOD(A2,4)=0,150,"NA")

And this will return 150 as a text value
=IF(MOD(A2,4)=0,"150","NA")

Grab the fill handle and drag down as far as
is needed.

HTH
Martin


"prem" wrote in message
...
How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if
it
is
not an integer.

For example, the formula should check if the content A2 divided by 4 is
an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in
this
manner. I.E check if content in cell A3 when divided by 4 is an integer
and
display the necessary in cell C3, check if content in cell A4 when
divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.






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
check if a number is integer or fraction Munir from Qatar New Users to Excel 2 April 5th 23 02:54 PM
Check if content in cell is an integer Mike H New Users to Excel 0 May 1st 08 09:53 AM
Check cells content based on a table David L[_2_] Excel Discussion (Misc queries) 1 November 22nd 07 12:58 AM
Check if result is an integer? Irdanwen Excel Worksheet Functions 2 October 25th 06 12:30 PM
i have a check box that keeps clearing out my cells content electromag Excel Worksheet Functions 0 September 1st 06 07:56 PM


All times are GMT +1. The time now is 08:58 AM.

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"