LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros and validation lists

First, name the cell that contains your validation list. Working wit
cell coordinates gets messy as your database gets larger. Also, if you
cell moves, then the reference changes.

The 'offset' command seems to be what you're looking for. It applies t
a cell with respect to another. The syntax is
Range("WhateverCell").offset(Number of rows, Number of colums)
If the number of rows, or columns, is 1, the next row or column will b
selected. If the varible is -1, the previous row or column i
selected.

In this example, I've named the cell D4, "valid1".
Sub ValidationChange

If Range("Valid1").Value = "AAA" Then 'range D4
With Range("valid1")
.offset(0,1).value = 0 'range E4
.offset(0,2).value = 0 'range F4
.offset(0,3).value = 0 'range G4
End With
End If

End Sub

- Gitcyphe

--
Message posted from http://www.ExcelForum.com



 
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
Validation lists... NWO Excel Discussion (Misc queries) 4 March 26th 09 02:53 AM
Drop down lists and macros lost and confused in excel-land[_2_] Excel Worksheet Functions 3 July 27th 08 03:20 PM
How to clear validation lists based on other validation lists Ben Excel Discussion (Misc queries) 1 March 12th 07 07:11 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM
pasting into lists using macros DanHegarty Excel Discussion (Misc queries) 0 June 12th 06 02:14 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"