Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default I Need a forumula or VBA code

Hi

I need a soltion as follows:

If the name in Columnn A has a corresponding blank cell in column G &
H then change the values in column I to zero that are associated with
the name in column A. Note that the number of entries associated with
each name is variable.

If you paste this into excel it will make more sense.


EMP_SHORT_NAME EMP_SENIORITY EMP_EFF_HIRE_DATE NOM_DATE DOW SEG_CODE
START_MOMENT STOP_MOMENT DURATION
Rea, Kelly 15/05/2006 02/11/2007 Fri SICS
Rea, Kelly 15/05/2006 02/11/2007 Fri SHIFT 02/11/2007 09:30
02/11/2007 14:30 300
Rea, Kelly 15/05/2006 02/11/2007 Fri PBRK1 02/11/2007 11:20
02/11/2007 11:30 10
Rea, Kelly 15/05/2006 02/11/2007 Fri PBRK2 02/11/2007 13:35
02/11/2007 13:45 10
Rea, Kelly 15/05/2006 02/11/2007 Fri BLFCHU 02/11/2007 09:30
02/11/2007 14:30 300
Rea, Kelly 15/05/2006 02/11/2007 Fri HUDD 02/11/2007 09:40
02/11/2007 09:50 10


Many thanks

W

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default I Need a forumula or VBA code

Like this?



Public Sub ClearColumnI()
Dim iRow As Long
Dim wsh As Excel.Worksheet
Dim calcs As Excel.XlCalculation

calcs = Application.Calculation
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

Set wsh = Application.ActiveSheet
With wsh
For iRow = 2 To .UsedRange.Rows.Count
If Len(.Cells(iRow, 7)) = 0 And _
Len(.Cells(iRow, 8)) = 0 Then
.Cells(iRow, 9).Value = 0
End If
Next iRow
End With

Application.Calculation = calcs
Application.ScreenUpdating = True
End Sub


On Nov 7, 2:24 pm, wrote:
Hi

I need a soltion as follows:

If the name in Columnn A has a corresponding blank cell in column G &
H then change the values in column I to zero that are associated with
the name in column A. Note that the number of entries associated with
each name is variable.

If you paste this into excel it will make more sense.

EMP_SHORT_NAME EMP_SENIORITY EMP_EFF_HIRE_DATE NOM_DATE DOW SEG_CODE
START_MOMENT STOP_MOMENT DURATION
Rea, Kelly 15/05/2006 02/11/2007 Fri SICS
Rea, Kelly 15/05/2006 02/11/2007 Fri SHIFT 02/11/2007 09:30
02/11/2007 14:30 300
Rea, Kelly 15/05/2006 02/11/2007 Fri PBRK1 02/11/2007 11:20
02/11/2007 11:30 10
Rea, Kelly 15/05/2006 02/11/2007 Fri PBRK2 02/11/2007 13:35
02/11/2007 13:45 10
Rea, Kelly 15/05/2006 02/11/2007 Fri BLFCHU 02/11/2007 09:30
02/11/2007 14:30 300
Rea, Kelly 15/05/2006 02/11/2007 Fri HUDD 02/11/2007 09:40
02/11/2007 09:50 10

Many thanks

W



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
If forumula for 4 conditions Charles Tippie[_2_] Excel Discussion (Misc queries) 4 September 10th 07 08:34 PM
New Forumula Issue AlienBeans Excel Discussion (Misc queries) 4 May 31st 06 09:37 PM
Need help making a forumula!!!! Dan Lieberman Excel Discussion (Misc queries) 15 September 3rd 05 10:19 PM
Showing a forumula Julia New Users to Excel 2 July 21st 05 09:18 PM
Help with FORUMULA LoriM Excel Discussion (Misc queries) 0 January 7th 05 07:31 PM


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