Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
programatically color fonts and auto sorting
hi
I am currently doing a spreadsheet by excel. I am thinking of 1 worksheet that holds all the data like a database. Then in the other sheets are the sorted and processed sheets to show data extracted. Lets call my database "DATABASE" and first worksheet would be "Shipping Schedule" First problem: for each row in Shipping Schedule worksheet, if under the REMARKS column is a "shipped" I would like to change the font of the whole row automatically to red words. Conditional formatting does not seem to work for me as it does not seem to run for each row. I believe, I will need a loop to do this. Can someone help me with this? Problem 2: when I open Shipping schedule, I like it to sort automatically by date as well under columns call "Fty ETD", then "buyer Etd", then "price" in order of priority. this is because, our clerks will be typeing in data in the DATABASE worksheet and when they click on Shipping Schedule worksheet, all the info would be there and sorted automatically without doing it manually. pls help. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
programatically color fonts and auto sorting
I believe there is a way to setup conditional formatting to do this but if you want the code for it, try this: (Assuming Column A has non-blank cells and Column B is the Remarks column) -Sub ConditionalFormatting() Dim cell As Range Set cell = Range("A1") While cell < "" If LCase(cell.Offset(0, 1).Value) = "shipped" Then cell.EntireRow.Font.Color = vbRed End If Set cell = cell.Offset(1, 0) Wend End Sub- Now for your filter, it would probably be easier for you to just record a macro and set up the sort the way you want it since you kind of need to know what the headings are for each column you want to sort by. After recording it, place the code in the "Shipping Schedule" worksheet object using this Subroutine: -Sub Worksheet_Activate() 'The recorded macro End Sub- Hope this helps some, Jason hi I am currently doing a spreadsheet by excel. I am thinking of 1 worksheet that holds all the data like a database. Then in the other sheets are the sorted and processed sheets to show data extracted. Lets call my database "DATABASE" and first worksheet would be "Shipping Schedule" First problem: for each row in Shipping Schedule worksheet, if under the REMARKS column is a "shipped" I would like to change the font of the whole row automatically to red words. Conditional formatting does not seem to work for me as it does not seem to run for each row. I believe, I will need a loop to do this. Can someone help me with this? Problem 2: when I open Shipping schedule, I like it to sort automatically by date as well under columns call "Fty ETD", then "buyer Etd", then "price" in order of priority. this is because, our clerks will be typeing in data in the DATABASE worksheet and when they click on Shipping Schedule worksheet, all the info would be there and sorted automatically without doing it manually. pls help. Thanks! -- jtp ------------------------------------------------------------------------ jtp's Profile: http://www.excelforum.com/member.php...o&userid=21132 View this thread: http://www.excelforum.com/showthread...hreadid=495882 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
programatically color fonts and auto sorting
hi Jason thanks a million let me try this out!! Merry Christmas ans
happy new year =) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing font color of protected cells programatically | Excel Discussion (Misc queries) | |||
Color changing of fonts by using the IF function | Excel Worksheet Functions | |||
How can i color the fonts | Excel Worksheet Functions | |||
How do I keep the color fonts in my cells when I use drop down? | Excel Worksheet Functions | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions |