Krishnab4u

New Member
Joined
Jul 16, 2018
Messages
34
Dear All gurus,
I am working on a excel file, which a bit large.
I have to scroll left right to identify any negative values.
Instead i am thinking if it is possible by Clicking on a button to
>identify the cell having the negative value
>Select the cell
>Show it in message box (a message box not hiding the selected cell).

After i correct the negative value, i may click the button to identify next negative value.

Kindly help me.
Thank You.
 
Dear Sir,
I appreciate your patience support. This time "13: Type Mismatch" message is not coming, while it still cant identify -ve values. It says "NO Negative values".
May be we have to change this

Code:
rng.Find(What:="-",
Please enlighten
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I appreciate your patience support. This time "13: Type Mismatch" message is not coming, while it still cant identify -ve values. It says "NO Negative values".
May be we have to change this
That is telling you that it cannot find any negative values in your range.
Are you sure that there are negative values in the range you have designated in your query?

I tested it out myself, and had this same behavior if there were no negatives in the range. If there were, it found them and stopped at those cells.
 
Last edited:
Upvote 0
sir, as i mentioned -ve values are as result of formula.
i tried the code in a separate sheet where in i had cells with -ve values just typed as well as cells with -ve values as result of formula.
the code is able to identify cells with -ve values typed but not the cells with -ve values obtained as result of formula.
kindly help.
 
Upvote 0
The last code I posted works fine for me, even when the amounts being returned are formulas.
What exactly do these formulas look like?
Can you post one?
 
Upvote 0
in the given range formula used is =+AD7+AD15 (this particular cell i.e AD23 has -ve value but not identified by the code) :(
In other ranges formula is =IFERROR(IF($Z$3="ALL INDIA",SUMIFS(INDIRECT(INDEX('Model Master'!$I$2:$I$9,MATCH($G102,'Model Master'!$I$2:$I$9,0))),DSD,"="&AB$3,ALLOCWEEK,"<="&$Z$2,MODEL,"="&$B102)-AB102-AC102,""),"")
 
Last edited:
Upvote 0
Try changing this argument in the FIND function in the VBA code:
Code:
LookIn:=xlFormulas
to this:
Code:
LookIn:=xlValues
 
Upvote 0
You are welcome.
Glad we finally got is solved for you.
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top