LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 2
Default If loop based on logic function

Hi all,
I have a bunch of lines programmed into the excel sheet. The code picks up the numbers from the cells and generates a pop-up message everytime a value is entered in the cells above them.

Each column contains one work week's data. The top row of the sheet contains the workweek number.

What I want to do is put two consecutive "if" condition for date verification.

If the data is entered in the column of the current workweek then it should run the above mentioned codes with some modification (I can handle the modification part).

If the data is entered in the column of any workweek later than current workweek then it should run the above mentioned codes in another configuration

Before it starts with the forecast section, it should verify the column in which the data is been entered against the current week and then choose accordingly.

This is how the code starts

Private Sub WorkSheet_Change(ByVal Target As Range)
Dim FP As Range
Dim FQ As Range
Dim FR As Range
Dim FS As Range
Dim ACP As Range
Dim ACQ As Range
Dim ACR As Range
Dim ACS As Range

' FOR FORCAST '''''''
Set FP = Range("E38:BI38")
If Not Application.Intersect(FP, Range(Target.Address)) _
Is Nothing Then
MsgBox "Please Order " & Target.Offset(24, -1).Value & " Quantity of Pump Systems by the End of Work Week " & Target.Offset(-2, -1).Value
End If




Thanks a lot for your help in advance.

Ajay
 
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
SUM columns based on 2 pieces of logic LOGICAL Excel Programming 2 May 9th 08 11:32 PM
selecting an answer based on a 3 way logic Sam B Excel Worksheet Functions 3 November 29th 07 07:11 PM
Logic and Loop Code oscarooko[_4_] Excel Programming 1 October 19th 05 04:23 PM
Function to loop through a column and return a value based on an x DoctorV[_2_] Excel Programming 0 July 8th 04 02:00 PM
Logic for a FOR loop Hari[_3_] Excel Programming 12 June 14th 04 11:27 PM


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

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"