Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare two cells in excel then event

Status
Not open for further replies.

ramnewbietoaccess

Programmer
Nov 4, 2002
52
US
I have been working with this and I have an idea about it but I am unsure about the correct vb code.

I have two sheets

Triggered by a macro button, I need to compare the cells of A1 (all rows)on sheet 1 to the cells A1 (all rows) on sheet 2

If the values are equal i would like it to copy and paste the next three colums on sheet 2 to to the next three colums in sheet 1

could someone please direct me on the code for this?

Maybe this is too elaborate to do and I would understand if it is. Thank you in advance
 
And what have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi,

Your statement
...compare the cells of A1 (all rows)on sheet 1 to the cells A1 (all rows) on sheet 2
does not make sense to me.

A1 is a SINGLE CELL.

Are you wanting to compare each cell in sheet1 with the corresponding cell in sheet2?

Then you state,
...copy and paste the next three colums on sheet 2 to to the next three colums in sheet 1

Next is relative to something. What is that something on sheet1 & sheet2?

Please post the code that you have developed so far.



Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top