A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Validation?



 
 
Thread Tools Display Modes
  #1  
Old June 15th, 2004, 10:25 AM
seftonbarn
external usenet poster
 
Posts: n/a
Default Validation?

I need some help. For arguments sake my worksheet has only one column.
In row 1 is a Y/N field. If the user enters "N" in row 1 I want the
cell in row 2 to use a formula to sum a load of other totals in other
worksheets. If row 1 is "Y" I want the user to be able to enter totals
manually into row 2. I have achieved this rather crudely with a
combination of a formula in row 2 that looks for the totals in the
other sheets and validation that prevents manual entry if row 1 is
"N".

This is OK unless having entered "Y" in row 1 and manually input data
into row 2 the user does then not change his mind and set row 1 back
to "N" expecting the formula to work. If this happens the formula is
lost in row 2. Any better ideas?? Thanks??


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

  #2  
Old June 15th, 2004, 07:12 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Validation?

Hi
see your other post

--
Regards
Frank Kabel
Frankfurt, Germany


I need some help. For arguments sake my worksheet has only one
column. In row 1 is a Y/N field. If the user enters "N" in row 1 I
want the cell in row 2 to use a formula to sum a load of other totals
in other worksheets. If row 1 is "Y" I want the user to be able to
enter totals manually into row 2. I have achieved this rather
crudely with a combination of a formula in row 2 that looks for the
totals in the other sheets and validation that prevents manual entry
if row 1 is "N".

This is OK unless having entered "Y" in row 1 and manually input data
into row 2 the user does then not change his mind and set row 1 back
to "N" expecting the formula to work. If this happens the formula is
lost in row 2. Any better ideas?? Thanks??


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


  #3  
Old June 15th, 2004, 07:14 PM
Cesar Zapata
external usenet poster
 
Posts: n/a
Default Validation?

hI,

I dont know if I really understand.


Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("a1")) Is Nothing Then
Exit Sub
End If

If Range("a1").Value = "N" Then
Range("a2").Formula = "=b2+c2"
Else
Range("a2").Value = ""

End If

end sub


so if a1 is y then put the your formula in a2 if a1 is n then delete the
formula in a2.

Code needs to be in the sheet code. press Alt + f11 then double click on
your sheet and paste code,



Cesar Zapata



seftonbarn wrote:

I need some help. For arguments sake my worksheet has only one column.
In row 1 is a Y/N field. If the user enters "N" in row 1 I want the
cell in row 2 to use a formula to sum a load of other totals in other
worksheets. If row 1 is "Y" I want the user to be able to enter totals
manually into row 2. I have achieved this rather crudely with a
combination of a formula in row 2 that looks for the totals in the
other sheets and validation that prevents manual entry if row 1 is
"N".

This is OK unless having entered "Y" in row 1 and manually input data
into row 2 the user does then not change his mind and set row 1 back
to "N" expecting the formula to work. If this happens the formula is
lost in row 2. Any better ideas?? Thanks??


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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.