Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creating a conditional formula

I want to create a formula where, If any date is entered into a column, then
the number 1 comes up in another column. Whenever a project has an issued or
approved date entered, I need the value 1 to come up in another column, which
will be totalled and current at any given time.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Creating a conditional formula

The following code below will need to be applied to the sheet's code for
whichever sheet you want to watch for this date input.

Let me know if you need any help...

Mark Ivey


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Long

' This for loop will work for rows 1 to 300
' change it to suit your needs
For i = 1 To 300
' The following condition checks for each cell
' in column B to see if it has a date in it.
' Then it applies a 1 to the same row, but
' for columns out from its current position.
' Change it to suit your needs.
If IsDate(Cells(i, 2).Value) = True Then
Cells(i, 2).Offset(0, 4).Value = 1
End If
Next
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creating a conditional formula

Mark,
I cannot get the formula right, sorry. I know this is wrong, but is this
close to how you write the formula?
=IFdate((C1),value)=true, then ((A1) value=1)

"Mark Ivey" wrote:

The following code below will need to be applied to the sheet's code for
whichever sheet you want to watch for this date input.

Let me know if you need any help...

Mark Ivey


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Long

' This for loop will work for rows 1 to 300
' change it to suit your needs
For i = 1 To 300
' The following condition checks for each cell
' in column B to see if it has a date in it.
' Then it applies a 1 to the same row, but
' for columns out from its current position.
' Change it to suit your needs.
If IsDate(Cells(i, 2).Value) = True Then
Cells(i, 2).Offset(0, 4).Value = 1
End If
Next
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Creating a conditional formula

Give this a try...

Go to the following website and apply the function discussed:

http://www.vbaexpress.com/kb/getarticle.php?kb_id=323


Then you can utilize the following formula for what you are trying to
accomplish.

=If(IsADate(C1)=TRUE,1,"")

Mark Ivey






"Mekre" wrote in message
...
Mark,
I cannot get the formula right, sorry. I know this is wrong, but is this
close to how you write the formula?
=IFdate((C1),value)=true, then ((A1) value=1)

"Mark Ivey" wrote:

The following code below will need to be applied to the sheet's code for
whichever sheet you want to watch for this date input.

Let me know if you need any help...

Mark Ivey


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Long

' This for loop will work for rows 1 to 300
' change it to suit your needs
For i = 1 To 300
' The following condition checks for each cell
' in column B to see if it has a date in it.
' Then it applies a 1 to the same row, but
' for columns out from its current position.
' Change it to suit your needs.
If IsDate(Cells(i, 2).Value) = True Then
Cells(i, 2).Offset(0, 4).Value = 1
End If
Next
End Sub

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
Creating a conditional formula to increment #s in a test script Derek Megyesi Excel Discussion (Misc queries) 0 March 16th 10 08:27 PM
Conditional formatting icon sets - creating a legend? dbagby Excel Discussion (Misc queries) 0 October 6th 09 05:17 PM
Creating a reader bar with Conditional Formatting Blue Max Excel Worksheet Functions 1 December 17th 08 07:06 PM
Creating borders via Conditional Formatting WLMPilot Excel Discussion (Misc queries) 1 November 8th 07 12:33 AM
Creating conditional format to protect cells 2442 Excel Discussion (Misc queries) 1 September 9th 07 02:21 AM


All times are GMT +1. The time now is 11:13 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"