Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default "Highlite" a "row" that has a "particular date"

Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input a date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row then
from Column A: to Column S: have the Fill colour be "Yellow" and the Text
"Red and Bold".

Thankyou.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default "Highlite" a "row" that has a "particular date"

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
Emd with
.Interior.ColorIndex = 5
Emd With
Emd if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the Text
"Red and Bold".

Thankyou.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default "Highlite" a "row" that has a "particular date"

Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the Text
"Red and Bold".

Thankyou.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default "Highlite" a "row" that has a "particular date"

If you have column C formatted as Date then Dim cRng As Date, If you have
Column C formatted as String then Dim cRng As String. Dim c As Range You
might have to play with the cRng a little to get the data type the same as
Column C. Otherwise it should work OK.

I also notice that I spelled Range wrong in the Set line. Trying to do two
things at once at my age is not smart.


"Steved" wrote in message
...
Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the
Text
"Red and Bold".

Thankyou.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default "Highlite" a "row" that has a "particular date"

This might handle the match up if Column C is formatted as Date dara type.

Sub hilite()
Dim cRng As String, c As Ramge
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
nDte = CDate(cRng) 'Convert string to date data type.
Set c = ActiveSheet.Range(C:C).Find(nDte, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
Emd with
.Interior.ColorIndex = 5
Emd With
Emd if
End Sub

If not, you might have to go back to the original and then make format
Column C as Text.

"JLGWhiz" wrote in message
...
If you have column C formatted as Date then Dim cRng As Date, If you have
Column C formatted as String then Dim cRng As String. Dim c As Range You
might have to play with the cRng a little to get the data type the same as
Column C. Otherwise it should work OK.

I also notice that I spelled Range wrong in the Set line. Trying to do
two things at once at my age is not smart.


"Steved" wrote in message
...
Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input
a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the
Text
"Red and Bold".

Thankyou.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default "Highlite" a "row" that has a "particular date"

Hello JLGWhiz

I Thankyou

Steved

"JLGWhiz" wrote:

If you have column C formatted as Date then Dim cRng As Date, If you have
Column C formatted as String then Dim cRng As String. Dim c As Range You
might have to play with the cRng a little to get the data type the same as
Column C. Otherwise it should work OK.

I also notice that I spelled Range wrong in the Set line. Trying to do two
things at once at my age is not smart.


"Steved" wrote in message
...
Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the
Text
"Red and Bold".

Thankyou.






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default "Highlite" a "row" that has a "particular date"

Hello JLGWhiz

Thankyou for the below

I'm Getting a

Compile error
Variable not defined

It is Highliting
nDte =

Can you please advice me as to what I have done or not done.

I Thankyou

Steved

"JLGWhiz" wrote:

This might handle the match up if Column C is formatted as Date dara type.

Sub hilite()
Dim cRng As String, c As Range
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
nDte = CDate(cRng) 'Convert string to date data type.
Set c = ActiveSheet.Range(C:C).Find(nDte, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

If not, you might have to go back to the original and then make format
Column C as Text.

"JLGWhiz" wrote in message
...
If you have column C formatted as Date then Dim cRng As Date, If you have
Column C formatted as String then Dim cRng As String. Dim c As Range You
might have to play with the cRng a little to get the data type the same as
Column C. Otherwise it should work OK.

I also notice that I spelled Range wrong in the Set line. Trying to do
two things at once at my age is not smart.


"Steved" wrote in message
...
Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input
a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the
Text
"Red and Bold".

Thankyou.








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default "Highlite" a "row" that has a "particular date"

Hello JLGWhiz from Steved

I finally got your Script to work

The reason was That I used an import ( "Oracle" )

And I did not read probably what you sent in your replies.

I Thankyou

ps I,m very sorry considering your program worked all the time.

"JLGWhiz" wrote:

This might handle the match up if Column C is formatted as Date dara type.

Sub hilite()
Dim cRng As String, c As Ramge
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
nDte = CDate(cRng) 'Convert string to date data type.
Set c = ActiveSheet.Range(C:C).Find(nDte, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
Emd with
.Interior.ColorIndex = 5
Emd With
Emd if
End Sub

If not, you might have to go back to the original and then make format
Column C as Text.

"JLGWhiz" wrote in message
...
If you have column C formatted as Date then Dim cRng As Date, If you have
Column C formatted as String then Dim cRng As String. Dim c As Range You
might have to play with the cRng a little to get the data type the same as
Column C. Otherwise it should work OK.

I also notice that I spelled Range wrong in the Set line. Trying to do
two things at once at my age is not smart.


"Steved" wrote in message
...
Hello JGLWhiz

I am getting a

Compile error:
Variable not Defined

It is highligting "cRng ="

Could you please take me the process for this to function.

Thanks for timeout


"JLGWhiz" wrote:

I believe you meant InputBox.

Sub hilite()
cRng = InputBox("Enter a date in dd-mmm-yyyy format", "Date")
Set c = ActiveSheet.Ramge(C:C).Find(cRng, LookIn:=xlValues)
If Not c Is Nothing Then
With ActiveSheet.Range("A" & c.Row & ":S" & c.Row)
With .Font
.ColorIndex = 3
.Bold = True
End with
.Interior.ColorIndex = 5
End With
End if
End Sub

This is untested, so it might hiccup. Check for typos.



"Steved" wrote in message
...
Hello from Steved

I'm using Office 2007

Highlite the "Row" from "Col A: to Col S:"

I would like to please have a message box that will allow me to input
a
date
ie "22-Jun-2009" which are in the Column C:C, which would goto the row
then
from Column A: to Column S: have the Fill colour be "Yellow" and the
Text
"Red and Bold".

Thankyou.








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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM


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