#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default 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


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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
questions about Dim funkymonkUK[_91_] Excel Programming 6 February 24th 06 04:17 PM
A few RTD Questions Ken Rangel Excel Programming 2 February 14th 04 02:29 AM
2 Questions ? Michael168[_43_] Excel Programming 1 October 31st 03 01:57 PM


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