ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validation Problems (https://www.excelbanter.com/excel-programming/335594-validation-problems.html)

loiboi

Validation Problems
 

Hello. Im having trouble with this macro,


Selection.Insert Shift:=xlDown
Selection.Offset(-1, 0).Range("A1").Select
Selection.Copy
Selection.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste

The cell that it copys the data from is validated as a whole number
between 0 and the contents of cell H47. When it pastes this data in
the cell below instead of being validated as a whole number between 0
and the contents of cell H48 its being validated as a whole number
between 0 and the contents of cell H49.

Any ideas?
Thanks


--
loiboi
------------------------------------------------------------------------
loiboi's Profile: http://www.excelforum.com/member.php...o&userid=25621
View this thread: http://www.excelforum.com/showthread...hreadid=390361


TommySzalapski[_12_]

Validation Problems
 

In your validation rule, change

=H47

to

=$H$47

The '$' tells it to lock to that row or column (so H$47 would allow it
to change to I47 if you copied into a cell to the right)


--
TommySzalapski
------------------------------------------------------------------------
TommySzalapski's Profile: http://www.excelforum.com/member.php...o&userid=25561
View this thread: http://www.excelforum.com/showthread...hreadid=390361


loiboi[_2_]

Validation Problems
 

Thanks for that but i didnt mean that. What i mean is when i copy the
content of the cell to the next cell down i want the value in the
validate bit to change like this:
=H47
=H48
but instead its doing this
=H47
=H49


--
loiboi
------------------------------------------------------------------------
loiboi's Profile: http://www.excelforum.com/member.php...o&userid=25621
View this thread: http://www.excelforum.com/showthread...hreadid=390361


loiboi[_3_]

Validation Problems
 

Ah solved it. :)
Thanks for the help! ;

--
loibo
-----------------------------------------------------------------------
loiboi's Profile: http://www.excelforum.com/member.php...fo&userid=2562
View this thread: http://www.excelforum.com/showthread.php?threadid=39036



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com