vba. how to apply a condition in an array.

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
984
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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Glad to be of some help. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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