Hello
I have another problem with this macro code,
whenever it's "#DIV/0!"
its an error and the loop stops,
what can i do to make it go further with the loop without coloring the
error rows?
Thanks in advance
2015-01-13 13:09 GMT+02:00 Ashish Kumar :
> Nice Solution Vaibhav Sir.
>
>
> Regards
>
Nice Solution Vaibhav Sir.
Regards
Ashish
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titl
Cheers!!
ᐧ
On Tue, Jan 13, 2015 at 3:49 PM, liron glam
wrote:
> PERFECT! thanks alot!!!
>
> 2015-01-13 12:15 GMT+02:00 Vaibhav Joshi :
>
>> This will not paint error..
>>
>> Sub Test_4()
>> Dim i As Long
>> Dim countErr As Long
>> countErr = 0
>> i = 2
>>
>> On Error GoTo err:
>> For Each c In R
PERFECT! thanks alot!!!
2015-01-13 12:15 GMT+02:00 Vaibhav Joshi :
> This will not paint error..
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr = 0
> i = 2
>
> On Error GoTo err:
> For Each c In Range("H2:H6930") 'A2:H30
> If c.Value > 0.18 And IsNumeric(c.Value) Then
> Range(
This will not paint error..
Sub Test_4()
Dim i As Long
Dim countErr As Long
countErr = 0
i = 2
On Error GoTo err:
For Each c In Range("H2:H6930") 'A2:H30
If c.Value > 0.18 And IsNumeric(c.Value) Then
Range(Cells(c.Row, 1), Cells(c.Row, 8)).Interior.ColorIndex = 3
countErr = countErr + 1
End If
er
thank you, its still paint "#DIV/0!" (when the function do 0/number)
and do you have an idea without range?
2015-01-13 11:46 GMT+02:00 Vaibhav Joshi :
> Ohh.. i see...Try this n let me know...
>
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr = 0
> i = 2
>
> On Error Resume Nex
Ohh.. i see...Try this n let me know...
Sub Test_4()
Dim i As Long
Dim countErr As Long
countErr = 0
i = 2
On Error Resume Next
For Each c In Range("H2:H6930") 'A2:H30
If c.Value > 0.18 And IsNumeric(c.Value) Then
Range(Cells(c.Row, 1), Cells(c.Row, 8)).Interior.ColorIndex = 3
countErr = countEr
Hi, it doesnt give me an error but it does paint the wrong number and it
counts the cells and i need it to count the rows (it gives 648 errors of
cells instead of 81 rows)
2015-01-13 7:07 GMT+02:00 Vaibhav Joshi :
> try this
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr =
Nice Solution Vaibhav Sir.
Regards
Ashish
On 13 January 2015 at 10:37, Vaibhav Joshi wrote:
> try this
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr = 0
> i = 2
>
> On Error Resume Next
> For Each c In Range("A3:H6930") 'A2:H30
> If c.Value > 0.18 And IsNumeric(c.Value)
try this
Sub Test_4()
Dim i As Long
Dim countErr As Long
countErr = 0
i = 2
On Error Resume Next
For Each c In Range("A3:H6930") 'A2:H30
If c.Value > 0.18 And IsNumeric(c.Value) Then
Cells(c.Row, 8).Interior.ColorIndex = 3
countErr = countErr + 1
End If
Next c
If countErr > 0 Then
Sheets("te
give debug :( thanks anyway
2015-01-12 17:23 GMT+02:00 Vaibhav Joshi :
> try this code..
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr = 0
> i = 2
>
> For Each c In Range("A3:H6930")
> If c.Value > 0.18 And IsNumeric(c.Value) Then
> Cells(c.Row, 8).Interior.ColorIndex = 3
> c
Nice Solution Vaibhav Sir.
Regards
Ashish
On 12 January 2015 at 20:53, Vaibhav Joshi wrote:
> try this code..
>
> Sub Test_4()
> Dim i As Long
> Dim countErr As Long
> countErr = 0
> i = 2
>
> For Each c In Range("A3:H6930")
> If c.Value > 0.18 And IsNumeric(c.Value) Then
> Cells(c.Row, 8).Inte
try this code..
Sub Test_4()
Dim i As Long
Dim countErr As Long
countErr = 0
i = 2
For Each c In Range("A3:H6930")
If c.Value > 0.18 And IsNumeric(c.Value) Then
Cells(c.Row, 8).Interior.ColorIndex = 3
countErr = countErr + 1
End If
Next c
If countErr > 0 Then
Sheets("test").Select
Range("E8").Se
But the numbers i want it to paint are only in column 8, cause in the other
ones i have other numbers and i don't want it to paint recording to them
2015-01-12 16:44 GMT+02:00 Vaibhav Joshi :
> what is your data range ?
>
> E.G. Your data range is B5:I100 then replace *A2:*H5 with the same..
>
>
my range is A3:H6930
2015-01-12 16:44 GMT+02:00 Vaibhav Joshi :
> what is your data range ?
>
> E.G. Your data range is B5:I100 then replace *A2:*H5 with the same..
>
> See attach file for sample..
>
> Cheers!!
> ᐧ
>
> On Mon, Jan 12, 2015 at 8:08 PM, liron glam
> wrote:
>
>> it still doesnt wor
what is your data range ?
E.G. Your data range is B5:I100 then replace *A2:*H5 with the same..
See attach file for sample..
Cheers!!
ᐧ
On Mon, Jan 12, 2015 at 8:08 PM, liron glam
wrote:
> it still doesnt work, i need it to do the check only on the 8 column,
> cause that's where the percents a
it still doesnt work, i need it to do the check only on the 8 column, cause
that's where the percents are,
any other idea?
thanks!!
2015-01-12 16:27 GMT+02:00 Vaibhav Joshi :
> Hi Liron
>
> try below code..
>
> *Sub Test_4()*
> *Dim i As Long*
> *Dim countErr As Long*
> *countErr = 0*
> *i = 2*
>
Cheers Sir Cheers...
On 12 January 2015 at 20:04, Vaibhav Joshi wrote:
> Thanks Ashish !!
>
> Cheers!!
> ᐧ
>
> On Mon, Jan 12, 2015 at 8:01 PM, Ashish Kumar
> wrote:
>
>> Nice Solution Vaibhav Sir.
>>
>>
>> Regards
>> Ashish
>>
>> On 12 January 2015 at 19:57, Vaibhav Joshi wrote:
>>
>>> Hi
Thanks Ashish !!
Cheers!!
ᐧ
On Mon, Jan 12, 2015 at 8:01 PM, Ashish Kumar
wrote:
> Nice Solution Vaibhav Sir.
>
>
> Regards
> Ashish
>
> On 12 January 2015 at 19:57, Vaibhav Joshi wrote:
>
>> Hi Liron
>>
>> try below code..
>>
>> *Sub Test_4()*
>> *Dim i As Long*
>> *Dim countErr As Long*
>> *
hi,
yes c is instead of i.
I have used range property to loop thru each cells in range, here c refers
to cell (range with single cell) .
you can also declare variable in the beginning Dim c As Range when you are
using option explicit.
Cheers!!
ᐧ
On Mon, Jan 12, 2015 at 8:00 PM, liron glam
wro
Nice Solution Vaibhav Sir.
Regards
Ashish
On 12 January 2015 at 19:57, Vaibhav Joshi wrote:
> Hi Liron
>
> try below code..
>
> *Sub Test_4()*
> *Dim i As Long*
> *Dim countErr As Long*
> *countErr = 0*
> *i = 2*
>
> *For Each c In Range("A2:H5") '< *If c.Value > 0.18 And IsNumeric(c.Value) Th
Hi :)
first of all thanks!, c is instead of i?
2015-01-12 16:27 GMT+02:00 Vaibhav Joshi :
> Hi Liron
>
> try below code..
>
> *Sub Test_4()*
> *Dim i As Long*
> *Dim countErr As Long*
> *countErr = 0*
> *i = 2*
>
> *For Each c In Range("A2:H5") '< *If c.Value > 0.18 And IsNumeric(c.Value) Then*
>
Hi Liron
try below code..
*Sub Test_4()*
*Dim i As Long*
*Dim countErr As Long*
*countErr = 0*
*i = 2*
*For Each c In Range("A2:H5") '< 0.18 And IsNumeric(c.Value) Then*
*c.Interior.ColorIndex = 3*
*countErr = countErr + 1*
*End If*
*Next c*
*If countErr > 0 Then*
*Sheets("test").Select*
*Range
I have big data file on excel, the file has 6930 rows and 8 columns, the 8
column has percents (0%, 4%, 16%, 18%, 19% and etc..)
I tried to do a macro that paint all the rows that the percent in them are
bigger then 18%, and it doesnt work, i would like to get some ideas how to
make it work, t
24 matches
Mail list logo