Every second row

Hello,
I have a problem:
I have a Numbers document with two sheets and two tables.
Table 1 has 1 column and table 2 has 2 columns.
I want two take all odd rows from table 1 to table 2, column 1 and all straight rows from table 1 to table 2, column 2.
For example:
Table 1:
A
1
2
3
4
5
6
7
8
Table two should become
A     B
1     2
3     4
5     6
7     8
Do you have any idea, how to do this?
Thankyou in advance...

In Table2:
A1=OFFSET(Table1 :: $A$1, 2*(ROW()-1)+(COLUMN()-1), 0)
select A1 and fill to the right
select A1 and B1, then fill down

Similar Messages

  • Formatting every second rows in Reports??

    Hi!Would like to add a shadow to every second row in Hyperion Reports. Cannot find a good solution to this since I'm using dynamic rows i.e. Children of xxxx.Does anybody have a good tip och trick on how to solve this.Thank you in advance,Erik

    Did you ever get resolution on this? I'm running into the same problem here and cannot figure it out myself.<BR><BR><BR>Thanks Much,

  • Cursor only updates every second row

    Hello Helpful Peoples
    I have a table with a set of delivery dates, and am wanting to add a date on which a reminder flag should be raised by the system. The delivery dates are already populated and I'm wanting to add functionality where the end user can set how many days prior they are reminded.
    I've opened a cursor to retrieve all the current due dates from my source table. When I loop through this cursor and update the reminder date and reminder text, my code is only updating every second row.
    I can't work out why this code seems to skip a row every time it updates a record. Is anyone able to assist?
    declare
    v_date rep_delivery.reminderdate%type;
    v_rownum number;
    CURSOR reminder_cur
    IS
    SELECT DEL.DUEDATE
    FROM REP_DELIVERY DEL
    WHERE DEL.REP_ID = :P212_REP_ID:
    FOR UPDATE OF DEL.REMINDERDATE;
    begin
    FOR x IN reminder_cur LOOP
    FETCH reminder_cur INTO v_date;
    EXIT WHEN reminder_cur%NOTFOUND;
    v_date := v_date - to_number(:P212_REMDAYS);
    UPDATE REP_DELIVERY DEL2
    SET DEL2.REMINDERDATE = v_date
    WHERE CURRENT OF reminder_cur;
    UPDATE REP_DELIVERY DEL3
    SET DEL3.REMINDERTEXT = :P212_DESCRIPTION
    WHERE CURRENT OF reminder_cur;
    END LOOP;
    commit;
    end;

    Oolite,
    Use this code:
    DECLARE
       v_date   rep_delivery.reminderdate%TYPE;
       CURSOR reminder_cur
       IS
          SELECT        ROWID, duedate
                   FROM rep_delivery
                  WHERE rep_id = :p212_rep_id
          FOR UPDATE OF reminderdate;
    BEGIN
       FOR x IN reminder_cur
       LOOP
          v_date := x.duedate;
          v_date := v_date - TO_NUMBER (:p212_remdays);
          UPDATE rep_delivery del2
             SET del2.reminderdate = v_date,
                 del2.remindertext = :p212_description
           WHERE ROWID = x.ROWID;
       END LOOP;
       COMMIT;
    END;and it will work for you.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Rules file lodas only every 2nd row from .txt source

    I have prepared a nice rules file, now deployed on the live
    server. when I copy it over to my dev it stops working because
    it loads only every SECOND row from my .txt source.
    Any ideas why that might happen? (I have no rejects specified)

    I wonder, are the live server and the dev server the same operating system? My first thought (and I have not tested) is that perhaps the line terminator in the data file is causing the every other line load?

  • Every second or third row

    a statement SELECT Column FROM Table returns all elements of Column ...
    is there any way to return only every second or every third or every ...-th element?

    I don't know about other databases, but in Oracle every row has a pseudo-column ROWNUM that you can use to do this easily. For example, every other row ought to be:
    SELECT Column FROM
    (SELECT Column, rownum i FROM Table ORDER BY somethinguseful)
    WHERE mod(i, 2) = 0

  • Form row banding interval - style every second field (skinning)

    Hello,
    I have a panelFormLayout on my ADF page, and I want to style every second filed.
    The problem is I can't set the styleClass statically because form fields are rendered conditionally.
    In a table there is RowBandingInterval adn certain pseudoclasses.
    Is there any simple solution for form?
    Well, I could call some Java bean (pagePhaseListener?) to iterate over form chlidren and to apply styleClass to every second, but I wouldn't call this a simnple solution.
    Maybe there's a skinning solution?
    Thanks.
    ADF 11.1.2.1

    Not sure if this will work, but you can give it a try.
    You can use an EL to set the style of each cell pointing to a bean method. Inside the bean method you can decide which style you return according to a static variable you init with 0 and increase it with every call of the method.
    Timo

  • Create data merged document with data on every second page?

    Is it possible to create a data merged document with the variable data only on every second page?
    I have set up the pages with the variable data as a master page (on every odd page) with the text box and paragraph style all set up, and I have set 'override master page items' so the data can be placed, but InDesign seems to freeze up when I try to create the merged document?

    There should be no problem doing the merge with a two-page master and a two-page template document with fields only on one page (and off the top of my head there's no reason to move them off the master page if that's where you put them). I think the problem here is that rachrachm already has a file of 500 pages (based on another thread asking how to apply masters to every other page).
    It's potentially possible to simply place the data file (without the header row) as a text file and auto-flow through the master page frames (can't say for sure without seeing the files), or if the pages without the merge fields are the same just, remove all but the first two pages from the template and do the merge.
    As I metioned earlier, though, this is a very inefficient method of producing that sort of document. A true variable data print flow would be better (you'd need to find a commercial printer who can do it with your data file), or the home version would be to make one single page file for the static content, print 250 copies (plus a few extras, just in case), then make a single page merge template, do the merge, and print that on the back of the already printed pages, or as a separate page. It is immeasurably faster to print multiple copies of a document than it is to print a document that has multiple identical pages.

  • Updating JTable every second, want to ignore these events in my listener

    I have a JTable that I update every second using
    table.getModel().setValueAt(data, row, col);I'm also reacting to when the user clicks on a row in a the table, using a ListSelectionListener:
    public class MyTableListener implements ListSelectionListener {
              public void valueChanged(ListSelectionEvent e) {
                   if (e.getValueIsAdjusting()) return;
                   //do stuff
    }And of course I've done this:
    table.getSelectionModel.addListSelectionListener(new MyTableListener());Problem is, every time I update the table data it generates an event handled by valueChanged() above. I need to prevent this.
    Do I need a customized table model for this?
    Thanks!

    Found the problem: I forgot I was using JXTable, not JTable. Here's my example:
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.*;
    import org.jdesktop.swingx.*;
    public class Test {
         JXTable table = null;//change this to JTable to fix
         public class MyTableListener implements ListSelectionListener {
              public void valueChanged(ListSelectionEvent e) {
                   System.out.println("event="+e.toString());
         public Test()
              JFrame frame  = new JFrame();
              String columns[] = {"one", "two"};
              Object data[][] = {{0, 0}, {0, 0}, {0, 0}};
              table = new JXTable(data, columns);//change this to JTable to fix
              table.getSelectionModel().addListSelectionListener(new MyTableListener());
              frame.add(new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
                          BorderLayout.CENTER);
              startThread();
              frame.setVisible(true);
         public static void main (String args[]) {
              Test test = new Test();
         public void startThread()
              class RefreshThread extends Thread {
                   public void run() { try {
                             while(true) { SwingUtilities.invokeLater(new Runnable() {public void run() {
                                       updateTable();
                                  sleep(1*1000);
                        } catch (Exception e) {e.printStackTrace();}
              RefreshThread rt = new RefreshThread();
              rt.start();
         public void updateTable()
              TableModel model = table.getModel();
              try {
                   for(int row = 0; row < model.getRowCount(); row++)
                        model.setValueAt(System.currentTimeMillis(), row, 0);
                        model.setValueAt(System.currentTimeMillis(), row, 1);
              } catch (Exception e) {
                   e.printStackTrace();
    }When I change it to a JTable, valueChanged() is not called every time I programmatically update the table.
    If it's a JXTable, valueChanged() is called with every update. Annoying!
    To compile/run the JXTable version you'll need something like
    java -cp swingx-1.0.jar:. TestAs for the events themselves, I added print statements with e.toString() and the events are not distinguishable from user interaction. I wonder if this is a JXTable bug or feature.
    Thanks!

  • How would I find the most common value every nth row in a column

    SCENARIO 1
    I have a column with a series of numbers in c1:c1000 as follows:
    2
    2
    3
    1
    1
    4
    2
    3
    1
    2...
    and I would like to find the most common value for every nth (in this case, second) row.
    SCENARIO 2
    Originally, I created a separate column in J and used this to find a value of 0 or 1 via a filter to label the rows odd or even. I was then going to create two separate columns, one for even rows of data and another for odd rows of data to separate them and perform functions on each column. But I do not know how to copy just the filtered data to one of the new columns to apply the MODE function (or any other for that matter).
    Perhaps my question should be: after applying a filter, how do i copy just the visible filtered data of every nth row to a new column in my spreadsheet while retaining the original column with all rows of data? 
    BACK TO SCENARIO 1
    If I do not need to go through this effort, I would just apply the MODE function (or AVERAGE or SUM) to every nth row in the original data column.

    Since Index and Offset were already taken, I used INDIRECT(ADDRESS()) in my example.
    Here's how I approached it:
    Expressions are as follows...
    Data Subset, Column A, Row 2: =IF(StartingRow :: A, 1, NSelector :: $A)
    Subsequent rows in Column A: =IF(ROW()<COUNT(Input :: $B)/NSelector :: A:$A+2, A2+NSelector :: $A, "")
    Data Subset, Column B, Rows 3
    throuth the last: =IFERROR(INDIRECT(ADDRESS(A+1, 2, ,,"Input")), "")
    Stats, Column A, Row 2: =IFERROR(MODE(Data Subset :: B), "No Mode")
    Stats, Column B, Row 2: =COUNTIF(Data Subset :: B, A)
    Lots of ways to skin this cat.
    Jerry

  • How to read two files (one is updating every second, the other is constant) simoltaneously

    Dear All,
    I will appreciate if somebody help me.
    I want to read two files, one is temperature wich is updating every second, and the other is hysteresis energy which has specific rows and is constant.
    I got a program in discussion forum which read a file as it is updating. I checked this program in my case and it works.
    Then I added reading hysteresis energy file to the existing file. But while i am running the program, the hysteresis energy file is read with all rows.
    But the aim is that everytime which temperature updates, I need to read just one row of the hysteresis energy file.
    so, in this way in every second i have a new temperature data and one row of the other file.
    I tried to used "for loop" inside the program, but it did not work, becuase reading temperature will be stopped untill for loop ends.
    I attached the program.
    Could somebody help me how to read just one row of hysteresis energy file everytime temperature updates?
    Solved!
    Go to Solution.
    Attachments:
    Readfiles.vi ‏23 KB

    I do not understand relationship between your two files.
    You have another VI or app that is writing data to both files and when new temperature data added you wish just to read the new data and then read one new line of the hysteresis file?????
    But is one is constant, why do you need to keep reading it?
    Anyway…
    The “Read From Spreadsheet File.vi” preformed an Open and a Close for each time it is called (if you will open the VI up and drill down and you will see). So that resets the file pointer back to the beginning and there for will read in the whole file from the first to the last each time if you do not set the start of read offset or number of rows.
    Now the Read from Binary File does not reset the file pointer and leaves the file pointer just past the last byte read so it will start with any new bytes automaicly only giving you the new data.
    I do not think you need to do the math with the Previous EOF=0 and the File size to get what I think you are trying to do.
    Plus use shift reg for the Data string instead of local var
    Set the mechinacl action of the stop botton to Latched
    So you do not need to init the two controls
    Also, I do not get the End of file encountered error (4) from the Read from Binary file if I attempt to read past. It just returns and empty string.
    Omar
    Attachments:
    Readfiles.vi ‏22 KB

  • REGEXP_REPLACE issue/bug - replaces only every second occurence

    Hi All
    I am using
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I need a regular expression to rename a variable in a mathematical formula, when testing my code I discovered that if the variable was repeated right after itself only one occurence was replaced. I need to only replace whole words as some variables can be a subset of a longer variable name, and variable names can have underscores in them.
    Below is an example of what happens.
    Can someone please tell me why this happens? Example code is:
    SELECT REGEXP_REPLACE('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab', '(\W|^)ab(\W|$)' , '\1xy\2',1,0,'i') from DUAL;
    The regular expression matches all 'ab' with a non alpha character or beginning line before and a non alpha or end of line at the end.
    I then replace the 'ab' with 'xy' and keep the original non alpha on either side. What happens is that only every second occurence is replaced.
    If I place a space after every '+' then it replaces all occurences. (Obviously this is a user field in a table of mathematical formulas so I cannot expect the user to worry about this problem.)
    I believe it may be due to the fact the pointer in finding all occurence is moved incorrectly and it does not find the match immediately after.
    Can someone please explain this? Or am I missing something in my example.
    Thanks
    Dudley

    Is this what you require? I changed your query a bit.
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(\W|^)ab(\W|$)',
      3                         '\1xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+ab+xy+ab+xy+ab+xy+abc+abc+xy
    1 row selected.
    SQL>
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+xy+xy+xy+xy+xy+xy+abc+abc+xy
    1 row selected.
    SQL> -- checking data with white spaces
    SQL> SELECT REGEXP_REPLACE ('ab + ab + ab + ab + ab + ab + ab + abc + abc + ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+AB+AB+ABC+ABC+AB',
    xy + xy + xy + xy + xy + xy + xy + abc + abc + xy
    1 row selected.
    SQL> Regards,
    Jo

  • I am getting a pop up on my iPhone 4S asking password of my iCloud even though I feed the password but still keep on asking the same thing every second so I am not able to use my iPhone.

    I am getting a pop up on my iPhone 4S asking password of my iCloud even though I feed the password but still keep on asking the same thing every second so I am not able to use my iPhone.at various times it asks different passwords.

    Curretly, there is an iCloud blackout.  It started this morning around 2AM California time (Pacific), 5AM New York (Eastern).  A lot of people have been having issues all day, including me.  No iCloud services are online.  Even Find My iPhone is down.

  • How to make the shade for every other row?

    Hi,
    i want the rows in my report dispalyed as:
    row1: gray
    row2: white
    row3: gray
    row4: white
    row5: gray
    thanx

    Hello,
    Highlight every alternate row
    Highlight every alternate row
    Regards

  • When I plug in ipod, it connects/disconnects every second, forever..Win-7

    My ipod worked fine when I was running XP, but when I changed to Windows 7 (32bit), it started doing this thing where it would disconnect and connect every second, for as long as it's little heart desired.
    i tried:
    -letting it die
    -restarting it
    -all possible solutions provided by itunes help
    -putting it into disk mode
    -reformatting it (it worked on dad's comp: win xp)
    other facts:
    -it still charges
    -still plays music when not connected to computer

    Having the same problem with Vista Ultimate 64 bit. Started about a month ago. Gen 1 iPod video that I have updates and connects fine, just not my 4Gen Nano. Sent it in for repair, they sent me back a different one, having the same problem.

  • "Ghost" page numbers on every second page - how to remove?

    Hi,
    I'm setting a short book with Pages and after importing from Word, I'm seeing duplicate, partially hidden additional page numbers on every second page. I'd like to remove them entirely, keeping Pages' page numbering. Removing and inserting page numbers doesn't help and the second set of numbers can't be selected in any way (clicking, dragging don't work). One solution would be to re-import from word, deselecting page numbers beforehand, but I'd rather like avoid this step as I made many changes in Pages.
    Here's a screenshot showing the duplicate page numbers: http://dl.dropbox.com/u/3304376/pages_bug.png
    Does anybody have an idea how to remove them?

    Hello,
    Sometimes in the process of importing from Word, page numbers are improperly converted to Master Objects or Background Objects. Go to Format > Advanced > Make Master Objects Selectable. Then, with the cursor in the Margin of the document, press the Command Key (Cursor changes to an Arrow) and drag the cursor diagonally across the page number to select it. Then press the Delete key and the number should be gone. You need to check carefully to make sure that you have eliminated all the instances. There may be one per Section.
    Jerry

Maybe you are looking for