Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Syntax for Select Case

Hello, I am trying to do the following IF statement in Select Case Syntax

In cell C9 I have written:

=If(and(H9=P9,S9=0),"Filled",If(and(H9P9,P9<0)," Partial",""))

I also need to have the above formula to work starting at C9 and continue down the entire C column, ie. C9, C10, . . .
This includes the numeric data in columns H, P, S, starting on line 9 on down respectively.

This would certainly get me started,

Thank you,

Susan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Syntax for Select Case

What problem are you having? That formula works, maybe not as you wish, but
it works.

And why can you not just copy C9 to C10 etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Susan Hayes" wrote in message
...
Hello, I am trying to do the following IF statement in Select Case Syntax

In cell C9 I have written:

=If(and(H9=P9,S9=0),"Filled",If(and(H9P9,P9<0)," Partial",""))

I also need to have the above formula to work starting at C9 and continue

down the entire C column, ie. C9, C10, . . .
This includes the numeric data in columns H, P, S, starting on line 9 on

down respectively.

This would certainly get me started,

Thank you,

Susan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Syntax for Select Case

The reason I wish to write the following formula in VBA is that the end users accidently delete the formula

On Tue, 29 Nov 2005 19:20:35 -0500, Susan Hayes wrote:

Hello, I am trying to do the following IF statement in Select Case Syntax

In cell C9 I have written:

=If(and(H9=P9,S9=0),"Filled",If(and(H9P9,P9<0), "Partial",""))

I also need to have the above formula to work starting at C9 and continue down the entire C column, ie. C9, C10, . . .
This includes the numeric data in columns H, P, S, starting on line 9 on down respectively.

This would certainly get me started,

Thank you,

Susan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Syntax for Select Case

Dim iLastrow As Long
Dim iLastrow2 As Long

iLastrow = Cells(Rows.Count, "H").End(xlUp).Row
iLastrow2 = Cells(Rows.Count, "P").End(xlUp).Row
If iLastrow2 i9lastrow Then
iLastrow = iLastrow2
End If
Range("C9").Resize(iLastrow - 8).Formula = _

"=If(and(H9=P9,S9=0),""Filled"",If(and(H9P9,P9<0 ),""Partial"",""""))"



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Susan Hayes" wrote in message
...
The reason I wish to write the following formula in VBA is that the end

users accidently delete the formula

On Tue, 29 Nov 2005 19:20:35 -0500, Susan Hayes wrote:

Hello, I am trying to do the following IF statement in Select Case Syntax

In cell C9 I have written:

=If(and(H9=P9,S9=0),"Filled",If(and(H9P9,P9<0), "Partial",""))

I also need to have the above formula to work starting at C9 and continue

down the entire C column, ie. C9, C10, . . .
This includes the numeric data in columns H, P, S, starting on line 9 on

down respectively.

This would certainly get me started,

Thank you,

Susan




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Syntax for Select Case

Typo

Dim iLastrow As Long
Dim iLastrow2 As Long

iLastrow = Cells(Rows.Count, "H").End(xlUp).Row
iLastrow2 = Cells(Rows.Count, "P").End(xlUp).Row
If iLastrow2 ilastrow Then
iLastrow = iLastrow2
End If
Range("C9").Resize(iLastrow - 8).Formula = _

"=If(and(H9=P9,S9=0),""Filled"",If(and(H9P9,P9<0 ),""Partial"",""""))"


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...
Dim iLastrow As Long
Dim iLastrow2 As Long

iLastrow = Cells(Rows.Count, "H").End(xlUp).Row
iLastrow2 = Cells(Rows.Count, "P").End(xlUp).Row
If iLastrow2 i9lastrow Then
iLastrow = iLastrow2
End If
Range("C9").Resize(iLastrow - 8).Formula = _

"=If(and(H9=P9,S9=0),""Filled"",If(and(H9P9,P9<0 ),""Partial"",""""))"



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Susan Hayes" wrote in message
...
The reason I wish to write the following formula in VBA is that the end

users accidently delete the formula

On Tue, 29 Nov 2005 19:20:35 -0500, Susan Hayes

wrote:

Hello, I am trying to do the following IF statement in Select Case

Syntax

In cell C9 I have written:

=If(and(H9=P9,S9=0),"Filled",If(and(H9P9,P9<0), "Partial",""))

I also need to have the above formula to work starting at C9 and

continue
down the entire C column, ie. C9, C10, . . .
This includes the numeric data in columns H, P, S, starting on line 9

on
down respectively.

This would certainly get me started,

Thank you,

Susan








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
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
VB Syntax to select a range xjetjockey Excel Discussion (Misc queries) 4 January 17th 07 03:12 AM
Select Case for Active Worksheet syntax. mikeburg[_43_] Excel Programming 2 December 2nd 05 12:26 AM
Syntax to select all data Stephen Excel Programming 6 September 24th 05 07:25 PM
Select Case syntax Susan Hayes Excel Programming 2 December 4th 04 10:42 PM


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