Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to color a row?

Hello,

using the code

Dim ArtVolgnummer As String
Dim NieuwArtikelNr As String

ProduktCode = InputBox("Geef de produktsoort op" & Chr(10) & Chr(10) &
"HardWare = hw" & Chr(10) & "SoftWare = sw", "Produktsoort")
Artikelvolgnummer = InputBox("Geef het nieuwe artikelnummer op" &
Chr(10) & Chr(10) & "9999", "Artikelnummer")
NieuwArtikelNr = ProduktCode & Artikelvolgnummer

Sheets("hoofdblad").Select
Range("A1").End(xlDown).Offset(1, 0).Formula = NieuwArtikelNr

I fill a cell on a worksheet with a value that looks like sw9999 or
hw9999

Now I would like yhat whole ROW to turn yellow if SW is found in the
NieuwArtikelNr or ProduktCode.

How would one do that?

Thnx for thinking!

Grtz Henro

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How to color a row?

Henro,

Use conditional formatting with a formula of

=COUNTIF(1:1,"*SW*)

and set the colour to yello.

--

HTH

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


"Henrootje" wrote in message
oups.com...
Hello,

using the code

Dim ArtVolgnummer As String
Dim NieuwArtikelNr As String

ProduktCode = InputBox("Geef de produktsoort op" & Chr(10) & Chr(10) &
"HardWare = hw" & Chr(10) & "SoftWare = sw", "Produktsoort")
Artikelvolgnummer = InputBox("Geef het nieuwe artikelnummer op" &
Chr(10) & Chr(10) & "9999", "Artikelnummer")
NieuwArtikelNr = ProduktCode & Artikelvolgnummer

Sheets("hoofdblad").Select
Range("A1").End(xlDown).Offset(1, 0).Formula = NieuwArtikelNr

I fill a cell on a worksheet with a value that looks like sw9999 or
hw9999

Now I would like yhat whole ROW to turn yellow if SW is found in the
NieuwArtikelNr or ProduktCode.

How would one do that?

Thnx for thinking!

Grtz Henro



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to color a row?

That does not work??????? It says there is an error in the formula?
And I have to select conditional formatting on all the fields in the
sheet right??

(Sorry, used to access, not excel)

TIA Henro

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to color a row?

By adding this code I get the first field (A) to colour yellow so I
guess I am getting close...............

Sheets("hoofdblad").Select
Range("A1").End(xlDown).Offset(1, 0).Formula = NieuwArtikelNr
If ProduktCode = "sw" Then
Range("A1:J1").End(xlDown).Offset(0, 0).Interior.ColorIndex =
6
End If

Now, how do I extend this to the whole row?

TIA Henro

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How to color a row?

Try again

=COUNTIF(1:1,"*SW*")0

or

=AANTAL.ALS(1:1;"*SW*")0

--

HTH

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


"Henrootje" wrote in message
oups.com...
That does not work??????? It says there is an error in the formula?
And I have to select conditional formatting on all the fields in the
sheet right??

(Sorry, used to access, not excel)

TIA Henro





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to color a row?

The last one did it!

Thanx!

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
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color mikewillnot Charts and Charting in Excel 1 February 26th 08 05:22 PM
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


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