vba. how to apply a condition in an array.

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
986
Office Version
  1. 2010
Platform
  1. Windows
Hello.
1625515260474.png

In this set of number the main condition is to delete any
Set of numbers that have the same different

In the example by simple inspection you can realize
That the first 4 sets have the same pattern [the same differences]
Only the last set is random.
I was wondering if I have to write for example

IF range(“B2”).value – range(“C2”) = range(“C2”).value – range(“D2”) _

And range(“D2’).value – range (“E2”).value = range(“E2”) – range(“F2”)_

And F2 – G2 then

End if
or do not display.
{display ONLY the set of numbers that do not have the same different)

Of course do not work
How can I write this kind of condition

My array is dynamic,
Size at the moment B2 : G xlend

Thank you for the time you take reading this.
any feedback will be appreciated
if there are not feedback I understand also.

(y)
 
wow wow wow Thank you so much GwteB, I really appreciate this. You really understand exactly what I need.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Glad to be of some help. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,753
Messages
6,180,747
Members
452,996
Latest member
nelsonsix66

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