coloum+vlookup

siddharth bhardwaj

New Member
Joined
Apr 2, 2018
Messages
3
Hello,

I would like to have a macro that will insert one blank column (C)
Into a (SHEET 1) workseet.

Also if this is do able have the following lookup run at the same time.

=VLOOKUP(B:B,Sheet2!H:I,2,False)

I work on These type of sheets on daily basis and i cant type to figure how to make this macro any pointers will gratefull.

Thank you.

Sid
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Select a cell on sheet 2 then turn on the macro recorder and carry out your actions manually then if you want the code tidied up or added to then post the code it produces in the thread in code tags (paste the code in the thread, select it and click the # icon).
 
Upvote 0
Select a cell on sheet 2 then turn on the macro recorder and carry out your actions manually then if you want the code tidied up or added to then post the code it produces in the thread in code tags (paste the code in the thread, select it and click the # icon).

Thank you very much for reply ill give it a go. :)
 
Upvote 0
From an Old post of mr excel i used this VBA its working perfectly
is it possible to add (COUNT IF >0 )also somewhere if i need value how many values i m comparing and how many i got in lookup.

Thank you in advance.



Sub Insert_Column()
Application.ScreenUpdating = False
Sheets("CBEXIIISoftCopy").Select ' change sheet name to sheet macro is to run on
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
Range("E2").Value = "Lookup"
Range("E3").Select
ActiveCell.Formula = "=VLOOKUP(D:D,Sheet2!B:B,1,0)"
Range("E3").Select
Selection.AutoFill Destination:=Range(Selection, Selection.Offset(0, -1).End(xlDown).Offset(0, 1))
Application.ScreenUpdating = True

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top