Formula help odd numbers

Runes

New Member
Joined
Jul 26, 2009
Messages
8
Ok I have a table where 2 columns cannot have odd numbers. I have a conditional format in place that turns the boxes red when and odd number is used but I need a warning to pop up saying "no odd numbers" in another box. I can get it to work for one box but when I try to get it to cover both columns it does not work. This is what I am using currently for my formula but as you can see it only covers one box IF((MOD(C5,2)<>0),"NO ODD NUMBERS!",""). I have tried to get both columns in here but it does not work. Can I include this in my conditional format as a second condition? Right now it is a separate formula in the box, which is fine also. I need the box to turn red (which it does) and say the above.

Any help would be appreciated.
 

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Hi.

Have you tried Data Validation?
You can highlight each column and apply a Data Validation message to be displayed when any of the cells are selected.
Or you can use this formula in DV to prevent the user from entering an odd number....
=MOD(C5,2)=0
C5 being the first cell in the column.

I hope that helps.

Ak
 

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Hi, thanks for the feedback, I'm pleased it worked for you.

Ak
 

Forum statistics

Threads
1,081,693
Messages
5,360,664
Members
400,592
Latest member
katekoz

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top