Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Automtacally change entry based on value in column.

Hi

I've searched the group and found 'Validation and filters with sub
scrolls' but didn't see a solution. Using Excel 2003 I have a column
with a List selection in, and a column next to it with a formula that
returns true or false (basically this determines if todays date, is a
date in another column + 30 days). If this is TRUE, i wish to set the
value to the relevant cell in the column to Expired.

I'm not sure how I do this or if it needs to be done on an Open
Worksheet event. Can anyone help please?

i.e

A B (to be hidden)
1 Status Validation
2 Open
3 Closed FALSE
4 Testing
5 Initial
6 Testing
7 Open TRUE
8 Open TRUE
9 Open FALSE
10 Open

So as soon as a value turns to TRUE then for example, row 7 and 8
should automatically become Expired.

Is this possible please?

Cheers

Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Automtacally change entry based on value in column.

We can use the Calculate event:

Private Sub Worksheet_Calculate()
n = Cells(Rows.Count, "B").End(xlUp).Row
For i = 1 To n
If Cells(i, 2).Text = "TRUE" Then
Cells(i, 1).Value = "Expired"
End If
Next
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu2007M


"Richhall" wrote:

Hi

I've searched the group and found 'Validation and filters with sub
scrolls' but didn't see a solution. Using Excel 2003 I have a column
with a List selection in, and a column next to it with a formula that
returns true or false (basically this determines if todays date, is a
date in another column + 30 days). If this is TRUE, i wish to set the
value to the relevant cell in the column to Expired.

I'm not sure how I do this or if it needs to be done on an Open
Worksheet event. Can anyone help please?

i.e

A B (to be hidden)
1 Status Validation
2 Open
3 Closed FALSE
4 Testing
5 Initial
6 Testing
7 Open TRUE
8 Open TRUE
9 Open FALSE
10 Open

So as soon as a value turns to TRUE then for example, row 7 and 8
should automatically become Expired.

Is this possible please?

Cheers

Rich

Reply
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
Automating to autofill column B based on column A entry GirlFridayCA Excel Discussion (Misc queries) 2 December 2nd 08 10:46 PM
Auto entry of data based on entry of text in another column or fie Judy Rose Excel Discussion (Misc queries) 2 May 21st 08 01:14 PM
Report row resutls based on data entry in column. par4724 via OfficeKB.com Excel Discussion (Misc queries) 0 March 26th 08 01:45 PM
Finding the last entry in a column based on criteria DKS Excel Worksheet Functions 9 January 18th 08 07:16 PM
Row filtering based on input box entry (column heading) Santed593 Excel Worksheet Functions 4 August 18th 05 12:35 AM


All times are GMT +1. The time now is 04:12 PM.

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

About Us

"It's about Microsoft Excel"