Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 insert line and formula - clearer format

Status
Not open for further replies.

rose12346

Technical User
Mar 12, 2014
6
US
I apologize for not formatting correctly I am still new to the site and did not realize the format was not correct. I should have previewed. I have on worksheet1 the following columns:
A. Store
B. Ship Via
C. Carton
D. SKU
E. Qty
Sample Data
[pre]A B C D E[/pre]
[pre]06001 FDX 7132 123456 2[/pre]
[pre]06001 FDX 7132 786115 3[/pre]
[pre]06010 FDX 8033 123456 1[/pre]
[pre]06011 INT 7943 661723 5[/pre]
This is what I would like to do on Worksheet 2:

For the first row or record on Worksheet1 have a macro or formula that would write the following in Worksheet2:

Sess0.Screen.Sendkeys("Worksheet1!A1<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("Worksheet1!B1<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("Worksheet1D1<Tab>Worksheet1E1<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

If the second record in worksheet1 has a value in C2 that is equal to C1 I want to write the following in Worksheet2 on the line preceeding what was written above for the first record:

Sess0.Screen.Sendkeys("Worksheet1D2<Tab>Worksheet1E2<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

If the next record in worksheet1 C3 does not equal the value in C2 then I want to write the following in Worksheet2 on the line preceeding written above if it does equal then I want to write the same information as record 2 above:

Sess0.Screen.Sendkeys("<Pf16>")

I then want to go back to the record which did not match C2 and write the following on Worksheet2:
Sess0.Screen.Sendkeys("Worksheet1!C3<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("Worksheet1!B3<Enter>") 3
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("Worksheet1D3<Tab>Worksheet1E3<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

Is this possible in Excel and I am not at all experienced with macros but I am more than willing to learn.

I might be in over my head but I am willing to attempt learning if this is at all possible within Excel 2007

Thank you
Rose12346
 
Hi,

Really having a difficult time trying to figure out what you're trying to do functionally.

Sess0.Screen... Tells me that you are using an Attachmate terminal emulator. I have no idea why??? Please explain. You PC needs no such interface for Excel!

You might just begin again, in this thread, to explain in plain English, what you're attempting, like I want to get some specific data from sheet 1 to sheet 2, without reference to HOW you think this ought to be done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top