SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Other Forums
 MS Access
 writing macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aakcse
Aged Yak Warrior

India
570 Posts

Posted - 09/27/2009 :  00:52:14  Show Profile  Reply with Quote
Hi All,

Can you plz help me in writing a macro for excel, my requirement is

I have 2 column data in excel, one coming from sybase and other from mssql( both the col consist of same data). I have done proper order by etc in db programming,to align both the column however, still I need to do realigning manually. which takes lot of time If columns are > 1K.

I want to write a macro which aligns columns 2 based on column 1, if there is no propermatch found for col1 in col2 then leave it blank in col2.

eg. for these in excel

Col1 Col 2
-------------------
dt_id amt_inv
tax_id tax_id
amt dt_id
amt_inv
amt_exl amt_exl


for the above I want output as below
for this I want to write macro, isstead of applying filter etc
as soon as I past the values in col2 it should run a macro to
align the col2 values with col2

Col1 Col 2
-------------------
dt_id dt_id
tax_id tax_id
amt
amt_inv amt_inv
amt_exl amt_exl



Regards,
cse.

april198474
Starting Member

11 Posts

Posted - 10/10/2009 :  06:20:03  Show Profile  Reply with Quote
You can try using LOOKUP function.

Edited by - april198474 on 06/05/2014 04:35:28
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000