![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Idaho
Posts: 4
|
OK I am going to try to describe this as best I can...
I have information that users enter in column B. If information is entered in any cell of column B then other information must be entered in the corresponding rows of columns C through G. I want the users to verify that this is happening by clicking a command button that launches a click event. I know I will need to use For...Next statements but I need help! Maybe using a Do...Loop statement? Any examples to help get my brain going would be greatly appreciated. Thanks! (I will have MANY MANY more posts regarding this project over the next several weeks so bear with me!) |
|
|
|
|
|
#2 |
|
New Member
Join Date: May 2002
Location: Idaho
Posts: 4
|
I have but I still can't figure out how to use that to accomplish what I need either. Any ideas for validations?
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
OK, I will look into using validation for this problem. I'm not sure if it can be done but will give it a good bash.
RET79 |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
procedures ?? The one I have in mind is the Private Sub Worksheet_Change(ByVal Target As Range) This event code fires when cells on the worksheet are changed by the user. The Target being the Active cell changed. So what you would setup is A "Monitored" range and take some action when the "Monitored" range IS Changed. Have a look in the Online help available via F1 in while in the VBA Editor. This is your 1st stop for programing examples.....next stop is to ask @ this board OR any other Board you fell confortable with. HTH |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Try this as a starting point:
Click D4, to go to data->validation then chooose - Allow: Decimal Data: Equal to Value: =IF($C4<>"",D4,"") Make sure the ignore blanks checkbox is unchecked. Note: you could copy this validation throughout your range in cols D to G if you so wished, copy D4 -> select the range you wish to paste it onto -> paste special -> validation. Then try this out. Put whole number in C4, then whole number in D4, it should be fine. Then, delete the number in C4 and put a whole number in D4. An error message should appear. Hope this helps, RET79 [ This Message was edited by: RET79 on 2002-05-21 20:45 ] |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
One obvious weakness with what I just suggested is this:
If you have values in both C4 and D4 and you deleted C4, then no error message will appear. The error message will only appear if you have typed in data in D4 while C4 ie already empty. So I guess it would be considered an appropriate solution only if the data were to be entered through the columns in order without any going back to delete the value in the C column. Anyway, it might give you some ideas nonetheless. RET79 [ This Message was edited by: RET79 on 2002-05-21 20:42 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|