Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default harder than i thought

=IF(U30,U1,"")

what i really want is for this to look in u4 and then u5 and so on until it
finds a 1 or a (1) and if it finds the negative (1) turn the reported number
red.

then in the next adjacent cell in the the formula to look for the next cell
that contains a number so if the first one found a number in u4 then i would
need this one to ignor that and look at u5 and so on.

i tried to use LARGE which i think is right but i'm doing something wrong. i
only need to find the first 6 columns that have a 1 in them because there
would never be more than 6 columns that contain a 1.

i will be searching about 40 columns.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default harder than i thought

You might be better with a macro: ALT + F11, Insert, Module and copy the code
into the module.

Return to the sheet, ALT + F8, select the macro and click run.

Sub FormatOnes()
Dim c, x As Integer, y As Long
Dim rngdata As Range
' change the change to suit
Set rngdata = Range("U3:U20")

For Each c In rngdata
y = c.Row
x = c.Column
If c = 1 Or c = -1 Then
Cells(y, x).Font.ColorIndex = 3
If Cells(y - 1, x) = c Then
Cells(y, x).Font.ColorIndex = 0
End If
End If
Next
End Sub


Regards
Peter

"Tomkat743" wrote:

=IF(U30,U1,"")

what i really want is for this to look in u4 and then u5 and so on until it
finds a 1 or a (1) and if it finds the negative (1) turn the reported number
red.

then in the next adjacent cell in the the formula to look for the next cell
that contains a number so if the first one found a number in u4 then i would
need this one to ignor that and look at u5 and so on.

i tried to use LARGE which i think is right but i'm doing something wrong. i
only need to find the first 6 columns that have a 1 in them because there
would never be more than 6 columns that contain a 1.

i will be searching about 40 columns.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default harder than i thought

SORRY,

I worte the question wrong. what i am trying to do is have it look in cell
u4 then cell v4 then cell w4 and so on, find a 1 or possibly a -1 and then
report the data in cell v1 to cell n4.

Each row has data from u to cs with about 500 rows of data. I have to parse
each row looking for a 1 or -1 or sometimes even a 2 or -2 then report the
value of the header row to one of 6 blank columns n to s.

"Billy Liddel" wrote:

You might be better with a macro: ALT + F11, Insert, Module and copy the code
into the module.

Return to the sheet, ALT + F8, select the macro and click run.

Sub FormatOnes()
Dim c, x As Integer, y As Long
Dim rngdata As Range
' change the change to suit
Set rngdata = Range("U3:U20")

For Each c In rngdata
y = c.Row
x = c.Column
If c = 1 Or c = -1 Then
Cells(y, x).Font.ColorIndex = 3
If Cells(y - 1, x) = c Then
Cells(y, x).Font.ColorIndex = 0
End If
End If
Next
End Sub


Regards
Peter

"Tomkat743" wrote:

=IF(U30,U1,"")

what i really want is for this to look in u4 and then u5 and so on until it
finds a 1 or a (1) and if it finds the negative (1) turn the reported number
red.

then in the next adjacent cell in the the formula to look for the next cell
that contains a number so if the first one found a number in u4 then i would
need this one to ignor that and look at u5 and so on.

i tried to use LARGE which i think is right but i'm doing something wrong. i
only need to find the first 6 columns that have a 1 in them because there
would never be more than 6 columns that contain a 1.

i will be searching about 40 columns.

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
Autofilter so different, harder to use drugrep Excel Discussion (Misc queries) 12 November 2nd 07 07:00 PM
Don't think it's possible, but I thought I would ask. smaumau Excel Worksheet Functions 1 April 3rd 06 11:20 PM
This is A LOT harder than I thought it would be Robert Excel Discussion (Misc queries) 13 August 24th 05 12:20 AM
Things are getting a little harder! S.H.C New Users to Excel 3 April 13th 05 11:08 PM
On second thought ... Jerry Kinder New Users to Excel 0 November 26th 04 02:38 AM


All times are GMT +1. The time now is 07:55 AM.

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"