[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Help with excel macro

Hi All

Attached excel

Check Column "A" with column "AP" in sheet "Desktops" If match
then check if Column "C" in "Temp" sheet match name in Column "L" in sheet "Desktop"
If yes then get the column "E" from "Temp" sheet to colum "R,X,Y

Color all rows that were updated in desktop and temp sheet
  • 4
  • 2
1 Solution
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:

column A in the "Desktop" sheet is empty.
None of the columns in the "Desktop" sheet have data that match with column AP.

>> If yes then get the column "E" from "Temp" sheet to colum "R,X,Y

What do you mean by "get"? Copy? Move? Into which sheet? Temp or Desktop?  Do you want the same value in all these columns? Why the duplicates? That does not look like good spreadsheet design.

You need to be a bit more clear on the specifications. How far did you get with your own macro? Can you post the code? Where did you get stuck?

We're happy to help you with your coding efforts, but you will need to provide more detailed specifications and the code you already have in place.

Most of this can be done without VBA, just with formulas. Do you really need VBA?

cheers, teylyn
bsharathAuthor Commented:

I mean column "L" not "A"

I want to copy from temp to "desktops sheet"

I am fine with a formula as well

But vba felt would be easy to run as its a repeated task. Would be used regularly

Columkn "R" and "X" will be repeated but do have different names in the actual file
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
In your data sample, none of the codes in column L match with column AP. Can you confirm that in your real data, there will be matches? Or do all the cells in column L start with "cde"?

Can you post a data sample that represents use cases for all possible scenarios?

cheers, teylyn
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Looking at column E in the temp sheet. One value is


Do you want to copy that same value to the columns R,X,Y in the desktop sheet?

You really need to explain the desired outcome. I have a feeling that you want to SPLIT the value in column E and distribute it to R, X and Y.

That's just my assumption, though.

Please take a step back and explain your whole requirements from scratch.

Trying to piece together your real requirements with 20 questions is a waste of your and our time.

cheers, teylyn
bsharathAuthor Commented:
Desktop sheet "AP" has to match Temp sheet "A"
Desktop sheet "L" match with temp sheet column "C"
If same then split the temp sheet colum "E" data into 3 parts and paste in desktop sheet
Yes as you said I want to split the temp sheet "E" into 3 parts and place them in "R,X,Y" columns

Color the rows on which have been updated with a color so i know what are the changes

The whole goal is match the employee id and machine name nd update the location of the users

Its a user database that i want to update

people have moved from one building to 4 other buildings
Hope this answers all your questions
else please buzz me will try to rephrase
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello bsharath,

I'm calling in some other experts, since I have a personal situation that needs my attention.

cheers, teylyn

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now