Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
2 questions
Good Day,
I'm still kind of new at writing macro's and had two quick questions. Is there a way to find in a selected data in Column AI if there is a negative integer to highlight, well more like fill row with a color. The follow up question would be could i do the following, with a selection of data could you do this...If Column AI has #DIV/0! and Column AN has a 0 hide that row, but it has to have #DIV/0! (AI) and a 0 (AN). Thank you very much and i do apprectiate any help i can get with this. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
2 questions
Here's a macro to hide rows based on the columns/values you listed. You
would start this macro with your cursor in the bottom most row or below. Sub Hiding_Rows_Macro() Do While ActiveCell.Row 1 If Cells(ActiveCell.Row, 35).Text = "#DIV/0!" And Cells(ActiveCell.Row, 40).Value = 0 Then Selection.EntireRow.Hidden = True Else Selection.EntireRow.Hidden = False End If ActiveCell.Offset(-1, 0).Select Loop End Sub Regarding your first question, you can use Conditional Formatting to make a cell a different color if negative (you would say <0 to indicate negative). On the menu, choose Format Conditional Formatting. Hope this helps, Keith "Newbee via OfficeKB.com" wrote: Good Day, I'm still kind of new at writing macro's and had two quick questions. Is there a way to find in a selected data in Column AI if there is a negative integer to highlight, well more like fill row with a color. The follow up question would be could i do the following, with a selection of data could you do this...If Column AI has #DIV/0! and Column AN has a 0 hide that row, but it has to have #DIV/0! (AI) and a 0 (AN). Thank you very much and i do apprectiate any help i can get with this. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
2 questions
question1
Sub colofif() mc = 6 For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row Rows(i).Interior.ColorIndex = 0 If Cells(i, mc) < 0 Then Rows(i).Interior.ColorIndex = 36 Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Newbee via OfficeKB.com" <u27679@uwe wrote in message news:796314d162383@uwe... Good Day, I'm still kind of new at writing macro's and had two quick questions. Is there a way to find in a selected data in Column AI if there is a negative integer to highlight, well more like fill row with a color. The follow up question would be could i do the following, with a selection of data could you do this...If Column AI has #DIV/0! and Column AN has a 0 hide that row, but it has to have #DIV/0! (AI) and a 0 (AN). Thank you very much and i do apprectiate any help i can get with this. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200710/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
questions about Dim | Excel Programming | |||
A few RTD Questions | Excel Programming | |||
2 Questions ? | Excel Programming |