bloomberg - How can I conditionally reorder EPS data in an Excel table using visual basic for applications based on the frequency of the earnings announcements? -


i have downloaded earnings per share data bloomberg large number of assets 1 year. resulting table measures 4 rows , around 3000 columns. columns contain 4 values, contain two, , contain 1 because of differences in reporting requirements:

  • some companies announce earnings on annual basis (31/12: 1 value)
  • some companies announce earnings on semi-annual basis (31/6 , 31/12: 2 values)
  • some companies announce earnings on quarterly basis (31/3, 31/6, 31/9, 31/12: 4 values)

the table values (b17:dkz20) preceded 1 column of announcement dates (a17:a20), correspond quarterly announcements of first company in list, because highest possible frequency , covers possible dates earnings announcements (31/03; 31/06; 31/09; 31/12).

because used:

range(b17:dkz17).formula = "=bdh([ticker], ""is_eps"", [beginning date], [end date], ""dates, period"", ""h,m"")" 

with optional argument hide dates in order display values directly next each other, can more written as:

""dates = hidden"" 

the table contains earnings announcements in order made, is, dates displayed correctly quarterly earnings announcement, annual announcements displayed having been made on 31/03 (when 31/12 correct) , semi-annual announcement displayed having been made on 31/03 , 31/6 (when 31/06 , 31/12 correct).

what need in order correct is:

  1. move entries columns 1 entry (annual) 3 cells down (from cell 1 cell 4);
  2. move entries columns 2 entries (semi-annual) cells 1 , 2 cells 2 , 4.

how can use manipulate table using visual basic (vba) in such way steps 1. , 2. performed? there command move values or have conditional cutting , pasting?

conditional cut/paste work fine. in general, direct assignment (i.e. range("a1").value = range("a2").value ) lot quicker cut/paste.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -