How to create a macro

Closed
mishti - Jul 12, 2009 at 11:46 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 12, 2009 at 08:23 PM
Hello,

i am completely new to the task of creating macros.can you please tell me how should i create a macro so that all the cells under a particular column should be able to take only integer values..its urgent..

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jul 12, 2009 at 08:23 PM
you do not need a macro
suppose the relevant column is column A
highlight A1
click data(menu)-validation
in the validation window
choosing settings at the top
under allow choose custom
under formula type this
=MOD(A1,1)=0
choose <error alert>
under <error messge> type something like this
This is not an integer
click ok


now copy A1 down upto A10.

now in any of the cells type 2.5 see what happens.

for further study see this web page
https://www.contextures.com/xldataval01.html
0