Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Function nonzero(r As Range) As String
nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You programmers always want to reinvent the wheel!
Biff "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You are, of course, correct.
You have proved to me over and over in your posts that you can do things with formulas that I though to be completely impossible without VBA. I have actually bookmarked a Google Groups search of your material. -- Gary''s Student - gsnu200728 "T. Valko" wrote: You programmers always want to reinvent the wheel! Biff "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have actually bookmarked a Google Groups
search of your material. If I were you I'd change the "search for author" criteria to Harlan Grove. Biff "Gary''s Student" wrote in message ... You are, of course, correct. You have proved to me over and over in your posts that you can do things with formulas that I though to be completely impossible without VBA. I have actually bookmarked a Google Groups search of your material. -- Gary''s Student - gsnu200728 "T. Valko" wrote: You programmers always want to reinvent the wheel! Biff "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Domenic is a good search criteria as well, he is not as polite as Harlan
though :)) -- Regards, Peo Sjoblom "T. Valko" wrote in message ... I have actually bookmarked a Google Groups search of your material. If I were you I'd change the "search for author" criteria to Harlan Grove. Biff "Gary''s Student" wrote in message ... You are, of course, correct. You have proved to me over and over in your posts that you can do things with formulas that I though to be completely impossible without VBA. I have actually bookmarked a Google Groups search of your material. -- Gary''s Student - gsnu200728 "T. Valko" wrote: You programmers always want to reinvent the wheel! Biff "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
LOL!
Biff "Peo Sjoblom" wrote in message ... Domenic is a good search criteria as well, he is not as polite as Harlan though :)) -- Regards, Peo Sjoblom "T. Valko" wrote in message ... I have actually bookmarked a Google Groups search of your material. If I were you I'd change the "search for author" criteria to Harlan Grove. Biff "Gary''s Student" wrote in message ... You are, of course, correct. You have proved to me over and over in your posts that you can do things with formulas that I though to be completely impossible without VBA. I have actually bookmarked a Google Groups search of your material. -- Gary''s Student - gsnu200728 "T. Valko" wrote: You programmers always want to reinvent the wheel! Biff "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Many thanks. I'll try it after I get home agian.
Cheers "Gary''s Student" wrote in message ... Function nonzero(r As Range) As String nonzero = "" For Each rr In r If rr.Value < 0 Then nonzero = rr.Address Exit Function End If Next End Function so if in row 17, F17 contains the first non-zero value then: =nonzero(17:17) will return $F$17 -- Gary''s Student - gsnu200727 "Mark" wrote: Hi I want to find the first cell that is not zero "0" across a row. I am also trying a VBA solution, but is there perchance a function that will do this? Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function to find the first cell that is not zero | Excel Worksheet Functions | |||
find cell function | Excel Worksheet Functions | |||
Function to find the address of a cell | Excel Worksheet Functions | |||
how can I use a function to find out if an individual cell is par. | Excel Worksheet Functions | |||
Is there a function for "not isblank" (find a cell that has a val. | Excel Worksheet Functions |