Need help with cell references

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I have two variables, representing row numbers in a set of dat
(titleissuestartrow and titleissueendrow).

I'm trying to set up a cell (B2 in this case) in which data i
validated based on a range between these two variables in column P
sort of like this.

However - the line beginning with Operator doesn't work. Originall
this line had absolute references in (e.g. $B$3) but obviously I can'
use this.

Help!!


Thanks
Jon

____________

Cells(3, 2).Select

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop
Operator:= _
xlBetween, Formula1:="=address(titleissuestartrow
19):address(titleissueendrow, 19)"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End Wit
 
your issue seems to be in the construction of the
addresses.

Try
Formula1:="=" & address(titleissuestartrow,19) & ":" &
address(titleissueendrow, 19)
alternatively
Formula1:="'=" & address(titleissuestartrow,19) & ":" &
address(titleissueendrow, 19) & "'"

Steve
 
But address(titleissuestartrow,19) is column S, not column P.
Is that the problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Find the Empty Cell Macro 9
VBA triggers on tabkey 8
Macro error 1
Data Validation List Problem 1
Macro to set new data validation each time 2
i to = column in Formula 19
Data Validation error 2
Validation Error 4

Back
Top