Required Macros to compare the value and need to take unique value and write in another column

dineshkummar

New Member
Joined
Apr 18, 2022
Messages
18
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have two Excel sheets with named :

Patching_MainSheet and ESL_Inventory

In Patching_MainSheet D column have 100 Servernames and ESL_Inventory Sheet A Column have 1845 Servernames and also I column have DataCentre name.
I need Macros to take one servername from Patching_MainSheet of D column and need to compare with 1845 Servernames in A Columns of ESL_Inventory Sheet if it matches, then it have to take one particular value(DataCentre Name) which is present I columns in ESL_Inventory and write down in B column of Patching_MainSheet.
Anyone guide me to prepare macros for this..

Thanks DK
 
Looks like there is a slight typo, try it like
Rich (BB code):
    For i = LBound(v2) To UBound(v2)
        If dic.exists(v2(i, 1)) Then
After I changed the script of those two lines and when I run i dont see anything running just simply nothing is happening.. Can I get your email id so that i can share the sheet privately so that you can check ?
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
In that case you'll have to wait for mumps to come back online.
 
Upvote 0
looks like he will come online tomorrow only, is it possible you to check the sheet ?
 
Upvote 0
I'm sure mumps will be back before tomorrow.
 
Upvote 0
@Fluff
Thanks for picking up on that.

I tested the macro using the data you posted and it worked properly. It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet (de-sensitized if necessary).
 
Upvote 0
how to write down in B column of Patching_MainSheet. ? macros is writing in A column..
 
Upvote 0
I need another help apart ESL_Inventory from I column, need to get data's from B,D and O has check and copy in E,I and J of Patching_MainSheet,

how we do that ?
 
Upvote 0

@Fluff : Any help on this :​

I need another help apart ESL_Inventory from I column, need to get data's from B,D and O has check and copy in E,I and J of Patching_MainSheet,

how we do that ?
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,148
Members
453,021
Latest member
Justyna P

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