Searching for values in a column

MazExpress

Board Regular
Joined
Aug 5, 2020
Messages
56
Office Version
  1. 2010
Platform
  1. Windows
I have a monthly sheet (Picture 1) that has 2 columns of concern, F & G. How to copy the values in column G to another workbook (Picture 2) in the column of the current month?
Knowing that:
1- The order of names in the first sheet is different from month to another.
2- Sometimes there are no names available in column F, so the corresponding values are useless.
3- Some names and values maybe unwanted (like P in Picture 1). In other words, I want to only copy the values in column G which have names in the second sheet.

Any help would be much appreciated.
 

Attachments

  • Capture15-81.JPG
    Capture15-81.JPG
    32.4 KB · Views: 3
  • Capture15-82.JPG
    Capture15-82.JPG
    39.4 KB · Views: 4
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 both sheets from each workbook. Alternately, you could upload a copy of both files to a free site such as www.box.com or www.dropbox.com. Once you do that, mark each file for 'Sharing' and you will be given a link to each file that you can post here. If the workbooks contains confidential information, you could replace it with generic data.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I noticed that the Actual file had 3 sheets. Sheet1 was set with the columns starting with column A on the left while the other two sheet started with column A on the right. I deleted Sheet2 and Sheet3 since they weren't necessary. I could not open the Aug.Profits file because my system did not recognize it as an Excel file. Is the Aug.Profits file and Excel file? If it isn't, then the macro will not recognize it. I created a dummy Excel file with the same data as the Aug.Profits file and tested the macro with your Actual file and the macro worked properly as you requested. :unsure: Just a reminder that the macro goes in a regular module in the "Aug" file.
 
Upvote 0
Both files are Excel files for sure.
Really I'm not understanding what's going on ! I tried the code again and again with the generic and the original files but it didn't work ! I must have a problem.
Anyways, many many thanks for your effort and your patience.
If any news, I will update you.
 
Last edited:
Upvote 0
Here are the links to your two files. The macro worked properly using these files.
Actual: Click here
Aug: Click here
 
Upvote 0
What version of Excel and what operating system are you using?
 
Upvote 0
I'm using exactly the same setup so I have no idea why the two files I posted are not working for you. Perhaps you can start a new thread describing the problem and maybe another Forum member may have some suggestions. Sorry. :(
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

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