How can I take data from specific column in a table using VBA

Hi
I do not know how to take the values from the last column in a table, I know how to look over each row but I cannot take the last column values for each row I pass by.
This is the table for example:
| Date | Account1 | Account2 | Description | Amount |
|12/03/2008 | 123-32 | 325-78 | None | $50 |
|12/03/2008 | 123-32 | 325-78 | None | $20 |
|12/03/2008 | 123-32 | 325-78 | None | $10 |
|12/03/2008 | 123-32 | 325-78 | None | $40 |
I am using this code as a reference that User FiveNines gave me to loop through all the rows in the table, so What I need is to take the values of the column Amount for each row I go through.
Private Sub RSWVBAPage_afterPlay()
Dim tbl As HTMLTable
Dim tblRow As HTMLTableRow
Dim tblCell As HTMLTableCell
Dim strValue As String
Dim rButton As HTMLInputElement
' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
' Strip out the ; for inner text comparison
strValue = Replace(strValue, ";", "")
' This will get the table but can be modifoed to be more specific
Set tbl = RSWApp.om.FindElement(, "TABLE")
' This loops through all the rows in the table until a match to the strValue is found
For Each tblRow In tbl.rows
If tblRow.innerText = strValue Then
RSWApp.WriteToLog "Tables", "Passed", "Row is Present", True
End If
Next
End Sub

Hi Lippix.
This is code that will loop the rows then loop the cells and check for "$" which will return dollar values. I also attached a script.
Private Sub RSWVBAPage_afterPlay()
Dim tbl As HTMLTable
Dim tblRow As HTMLTableRow
Dim tblCell As HTMLTableCell
Dim strValue As String
' This will get the table but can be modifoed to be more specific
Set tbl = RSWApp.om.FindElement(, "TABLE")
' This loops through all the rows in the table until a match to the strValue is found
For Each tblRow In tbl.rows
  For Each tblCell In tblRow.cells
  ' cycle through the cells and only report those with a dollar value by searching for $
    If InStr(1, tblCell.innerText, "$") <> 0 Then
   RSWApp.WriteToLog tblCell.innerText
   End If
  Next
Next
End Sub

Similar Messages

  • How can I Move data from one column to another in my access table?

    I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
    I understand how to drop a column or add a column, how do I transfer data from one column to another.
    Here is my trial code:
    <cfquery name="qQueryChangeColumnName" datasource="#dsn#">
      ALTER TABLE leaderboard
      UPDATE leaderboard SET  points2 = points3
    </cfquery>
    Unfortunately, I get the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
    How can I transfer my data with the alter table method?

    I looked up the Access SQL reference (which is probably a
    good place to start when having issues with Access SQL), and
    it suggests you probably need a WHERE clause in there.
    I agree the documentation is a good place to start. But you should not need a WHERE clause here.
    Too few parameters. Expected 1.
    If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..

  • How can I import data from a csv file into databse using utl_file?

    Hi,
    I have two machines (os is windows and database is oracle 10g) that are not connected to each other and both are having the same database schema but data is all different.
    Now on one machine, I want to take dump of all the tables into csv files. e.g. if my table name is test then the exported file is test.csv and if the table name is sample then csv file name is sample.csv and so on.
    Now I want to import the data from these csv files into the tables on second machine. if I've 50 such csv files, then data should be written to 50 tables.
    I am new to this. Could anyone please let me know how can I import data back into tables. i can't use sqlloader as I've to satisfy a few conditions while loading the data into tables. I am stuck and not able to proceed.
    Please let me know how can I do this.
    Thanks,
    Shilpi

    Why you want to export into .csv file.Why not export/import? What is your oracle version?
    Read http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php
    Regards
    Biju

  • How can I take data from multiple pages documents and put them into a numbers table?

    I produce invoices in pages, with dates, invoice numbers, references and amounts due. I want to take all this data from multiple documents and transfeer it to a single numbers table. Is this possible and if so, how do I do it. I know I can do it the other way round with mail merge but I can't figure out how to do it this way round?
    Thanks,
    Keith

    The data is spread throughout a pages document in specific areas here's a copy of an invoice for you to have a look at.

  • Help with lists and Numbers - how can I separate data from one column?

    I have a series of data entries that have two or three pieces of information listed in one column (it was a list copied from the Internet). My data is in this form all in one column (ie Column A):
    XXXX -- YYYY, ZZZZ
    I want to be able to easily split that data into three columns (A, B, and C) without having to go through and manually separate all of the entries? I'd ideally like to have XXXX in one column, the '--' removed, YYYY in another column, and ZZZZ in a third column, like this:
    Column A Column B Column C
    ====== ====== ======
    XXXX YYYY ZZZZ
    Is this possible? Any help is appreciated.

    BlooGoo
    Open or paste your material in your favorite texteditor. TextEdit will suffice but there are better applications. Make sure your material is consistent, especially that there are no stray characters or extra spaces studded in the text. You can do this by using the clean up routine as described below.
    1. Copy the set of characters you want to replace. In this case " -- " Note that there are spaces on each side of the dashes and you want to get rid of those.
    2. Open the *Find and Replace* dialogue:
    +Menu > Edit > Find > Find…+ (or command f)
    Paste the " -- " into the Find: field, then type a comma in the Replace: field or
    Copy and paste a tab from the document or
    Click on the Advanced button and enter a tab using the Insert… button that appears.
    3. Click *Replace All.*
    Repeat as necessary. If it doesn't seem to work, copy and paste the bits that stick, usually there is something not visibly different but different as far as the computer iust concerned.
    When you are finished save the results as a comma or tab delimited delimited .txt file and reopen it in Numbers.
    Peter

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • How can I take minutes from mysql date format

    how can I take minutes from mysql date format??
    example 10:30:00 is stored in my sql and I want to create 3 variables which will store hours, minutes and seconds..
    Cheers..

    "use application date format" is the choice you want.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How can I migrate data from SQL Server 6,5 to Oracle 8?

    We have a web site based on Microsoft SQL Server 6.5.Now we plan
    to migrate the database to Oracle 8.
    We have redesigned the tables structure and created tables under
    Oracle 8, so we only need to migrate data from SQL Server.
    We've exported data from SQL Server to text files.
    How can we import data from files and restore to Oracle tables.
    Is there a solution which let us to import data for particular
    table columns,not all columns?
    We'll be appreciated if somene can give suggestions.
    Regards
    Michael
    null

    Thank you for your reply.
    I'll try the Oracle sqlloader utility first.
    Regards
    Micahel
    Oracle Migration Workbench Team wrote:
    : Michael,
    : Oracle sqlloader is user for this sort of operation, see
    : Oracle8i Utilities
    : Release 8.1.5
    : A67792-01
    : available online through Oracle Technology Network.
    : The Oracle Migration Workbench can be used to create bcp and
    : sqlloader scripts, though since you have altered the schema
    these
    : scripts would need to be altered by hand after generation.
    : Some thought has been put into redesigning table structures in
    : the Oracle Migration Workbench, but currently it looks like
    this
    : reengineering will be left to be done by other tools, eg
    Oracle
    : Designer, once the SQLServer database has been duplicated with
    as
    : little change as possible onto Oracle.
    : Hope that helps,
    : Turloch
    : Oracle Migration Workbench Team
    : Michael (guest) wrote:
    : : We have a web site based on Microsoft SQL Server 6.5.Now we
    : plan
    : : to migrate the database to Oracle 8.
    : : We have redesigned the tables structure and created tables
    : under
    : : Oracle 8, so we only need to migrate data from SQL Server.
    : : We've exported data from SQL Server to text files.
    : : How can we import data from files and restore to Oracle
    tables.
    : : Is there a solution which let us to import data for
    particular
    : : table columns,not all columns?
    : : We'll be appreciated if somene can give suggestions.
    : : Regards
    : : Michael
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • How can I modify data from a Transparent Table without ABAP code.

    Hi,All
    How can I modify data from a Transparent Table (like TCURR),  and important thing is I want do all that with no ABAP code here. It is like that we always do that in a Oracle database use TOAD or PLSQL third party tools, with no script code here.
    I had fond that there is a way can do that:
    1, type 'se11',and Display Database table 'TCURR', click Contents, then click Execute to display all data
    2, type '/h' and let debugging on
    3, select one of this data then click 'Display',enter in debugging system.
    4, then make a breakpoint in the code. But... display a dialog let I type a 'ABAP Cmnds', I want to know what can be type in for that?
    and, My system is ECC6.
    thank you all
    Edited by: xuehui li on Aug 20, 2008 6:30 PM

    Hello,
    Your approach (with Vijay's suggestion) MAY work.  However, depending on how tight security is at the company that you are working at you may or may not be able to acutaly change the value of the SHOW field to EDIT.  This will be especially true if you are working in a Production environment.  Vijay's other comment is true as well.  This is not a recommended approach to change data (especially data with a financial impact like TCURR) in a production environment.  The auditors will not be impressed.
    Explore the option of a maintenace view or look at tcode TBDM to upload a file which includes daily rates from providers like Reuters or try tcode s_bce_68000174 which is a maintenance view on TCURR.
    Regards
    Greg Kern

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How can I transport data from one client to another client?

    How can I transport data from one client to another client? 
    Regards,
    Subho

    hmmm, CTS = cutomizing transport?
    If you have a customizing table, there are still two possibilities.
    1. customize in DEV system and transport
    2. customize right there where you need it.
    this depends on how the maintainance view is built. If it is a simple customizing table and you get not asked for a TR when customizing a new record or changing an existing one, you hit possibility 2.

  • How can I get Data from the Sound cart in Labview? Does a VI exist?

    How can I get Data from the Sound cart in Labview? Does a VI exist?

    Yes, there are VIs for acquiring data from Sound cards. And examples too. If you don't have LabVIEW yet, do a search on NI's site for example VIs.
    Khalid

  • How can i store data from a pc to TC

    how can I backup data from a PC to TC

    Get a suitable backup software..
    Windows backup is of course useless. But you should already know that. It will not work on any version less than pro anyway.. due to MS deciding people with home versions should never use networks. ???
    That is why there is one million and one third party backup software that do work with network drives. Look up reviews of what works well. for the price you want to pay and get it.. Drive Image was a popular one. I must have a copy somewhere I bought .. then changed to Mac..
    There are plenty of free ones.. I do use macrium reflect.. does disk image only unless you pay the license.. but works super well.. particular for restore.. which people kind of forget.. the value of backup is how well does it restore.
    Use ethernet if possible.
    Note that mixing TM and data on the TC is not necessarily a great idea if you are also running Macs.

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    How can I migrate data from an old MBA to a new one without having access to the screen of the old one? The screen of the old MBA is damaged !

    If your "older" MBA has a Thunderbolt port then it isn't that old. See Target Disk Mode about how it's used. Note that without a monitor you won't be able to tell from the screen when it has fully started, and if it succeeded in starting in TDM. If it did, then the hard drive should appear on the Desktop of your new computer. You can then access it to transfer your files. You can even use Migration Assistant or any backup utility to transfer data. Just don't try to transfer system files.

Maybe you are looking for