Excel VBA : lookup and copy data(repost)

Completed Posted Feb 23, 2010 Paid on delivery
Completed Paid on delivery

fix my code

See file attachment for important images and current code, correct each line of code and add the additional need code to work

## Deliverables

**********************

*

* EXCEL VBA script

*

**********************

Sub S()

For i = 1 To 10

'(slide page 1)*************************

' go to [url removed, login to view]

' look up value in column B row i

' enter value in date field form [url removed, login to view]

( this code is not accurate)

DateValue = Workbook(Book2).Cells(i, 1)

ComboValue = Workbook(Book2).Cells(i, 7)

'(slide page 2)************************

'Set WshShell = CreateObject("[url removed, login to view]")

'go to internet explorer

[url removed, login to view] "Query Parameters - Microsoft Internet Explorer"

Sleep 100

'Start at "starting point for each loop"

enter code

'tab (8x) to get to first date field

For x = 1 To 8

[url removed, login to view] "{tab}"

Sleep 500

Next x

'paste value stored in dateValue in the internet explorer field

enter code

'tab (2x) to get to second date field

For x = 1 To 2

[url removed, login to view] "{tab}"

Sleep 500

Next x

'paste value stored in dateValue in the internet explorer field

enter code

(DateValue)

'tab (2x) to get to ComboValue field

For x = 1 To 2

[url removed, login to view] "{tab}"

Sleep 500

Next x

'paste value stored in dateValue in the internet explorer field

enter code

(ComboValue)

'tab (2x) to get to 'OK' link

For x = 1 To 12

[url removed, login to view] "{tab}"

Sleep 500

Next x

'select the OK button( this code is not accurate)

keybd_event VK_Enter, 0, KEYEVENTF_KEYUP, 0

keybd_event VK_Enter, 0, KEYEVENTF_KEYUP, 0

'slide 3*************************************

'wait 3 minutes for data to process

Sleep (300000)

'Set WshShell = CreateObject("[url removed, login to view]")

'go to internet explorer new page

[url removed, login to view] "BIAS WEBDashboard - Microsoft Internet Explorer"

Sleep 1000

'tab (2x) to get to export search field field

For x = 1 To 12

[url removed, login to view] "{tab}"

Sleep 500

Next x

'select the 'Export search results o excel' link

( this code is not accurate)

keybd_event VK_Enter, 0, KEYEVENTF_KEYUP, 0

keybd_event VK_Enter, 0, KEYEVENTF_KEYUP, 0

'*slide 4***************************************

'sleep(4 seconds) to allow downloading

Sleep (4000)

'select SAvE and name file as the value stored in ComboValue => [url removed, login to view](i,7)// column G

enter code

'*********side 5 **********************************

'open the file just saved and named 'combovalue'

'look through column AN and find the rows that has value 204

'allow user to change value to search for

ValueSearch = 204

'if value in cells(row=i, columnAN) =ValueSearch

'************slide 6 *****************************

For n = 0 To 5 ' looking through all the vallues that have ValueSearch=204 in column AN

copy the data in that row for columns( X, Y , Z, AA , AN ) to Book2 in column(AB,AC, AD, AE, AF)

'notice that the next set of data will be added to the right of the column AF using the ((column AB)+n)

workbook(Book2).cells(i,(column AB)+n)= cells(row,columnX)

workbook(Book2).cells(i,(column AC)+n)= cells(row,columnY)

workbook(Book2).cells(i,(column AD)+n)= cells(row,columnZ)

workbook(Book2).cells(i,(column AE)+n)= cells(row,columnAA)

workbook(Book2).cells(i,(column AF)+n)= cells(row,columnAN)

Next n

Next i

End Sub

Engineering MySQL PHP Project Management Software Architecture Software Testing

Project ID: #3206229

About the project

3 proposals Remote project Active Feb 24, 2010

Awarded to:

getitrightvw

See private message.

$17 USD in 10 days
(33 Reviews)
3.9

3 freelancers are bidding on average $37 for this job

ramanujana

See private message.

$29.75 USD in 10 days
(35 Reviews)
4.4
ajpatel

See private message.

$63.75 USD in 10 days
(13 Reviews)
3.5