View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Excel sort vs VBA

Hi Glynn,

Perhaps:

Ad Spend - Arbeitsagentur (Group Label)


should be

Ad Spend - Arbeitsagentur - (Group Label)

( missing hyphen ?)


---
Regards,
Norman


"Glynn Consulting Ltd" <Glynn Consulting
wrote in message ...
This is part of a sequence that was sorted in ascending order in Excel...

Ad Spend - Arbeitsagentur - Press (?)
Ad Spend - Arbeitsagentur - Trade Magazines/Press ($)
Ad Spend - Arbeitsagentur - Trade Magazines/Press (?)
Ad Spend - Arbeitsagentur (Group Label)
Ad Spend - Cadremploi - Online ($)
Ad Spend - Cadremploi - Online (£)

When running a loop in VBA, the value in the 4th line is less than the
value
in the 3rd. Why did is this so?

Is there a way of comparing cells so that the hireachy is the same as
Excel
uses for sorting.

Currently I am using..

if range(CellAdress).value < range(CellAdress.offset(1,0)).value then...