Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Replacing data in a row of sheet1 with data in a row of sheet 2 based on a field in both sheets being the same?

Here is what I have:
I have 2 sheets named:
(APCURRENT),(CORPCONTACT)

In both sheets I have vendor names as Column A.
I want to look at APCURRENT "vendor names" and if CORPCONTACT "vendor
names" is
the same, I want to replace the APCURRENT B-H(Columns) with the
B-H(Columns) of CORPCONTACT. But only if they are equal if not ignore.

Any help would be greatly appreciated.
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Replacing data in a row of sheet1 with data in a row of sheet 2 based on a field in both sheets being the same?

HERE IS WHAT I HAVE RIGHT NOW THAT WILL CHANGE THE FIRST ROW OF
APCURRENT TO THE INFORMATION IN CORPCONTACT, but would like it look the

whole sheet and change every instance of the first command being true.

Sub COPYDATA()

Dim APCURRENT As Worksheet
Dim CORPCONTACT As Worksheet

Set APCURRENT = ThisWorkbook.Sheets(1)
Set CORPCONTACT = ThisWorkbook.Sheets(2)

If APCURRENT.Range("B2").Value = CORPCONTACT.Range("A2").Value Then

APCURRENT.Range("C2").Value = CORPCONTACT.Range("B2").Value

APCURRENT.Range("D2").Value = CORPCONTACT.Range("C2").Value

APCURRENT.Range("e2").Value = CORPCONTACT.Range("d2").Value

APCURRENT.Range("f2").Value = CORPCONTACT.Range("e2").Value

APCURRENT.Range("g2).Value = CORPCONTACT.Range("f2").Value

End If

End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data in sheet1 to be put into sheets 2, 3, 4, 5, etc Cord Excel Discussion (Misc queries) 2 December 18th 09 10:19 AM
Seperate data from one sheet to multiple sheets based on a column [email protected] Excel Discussion (Misc queries) 7 September 8th 07 12:31 AM
Help: formula=auto copy from sheet1, A1 only if data in field E1 . pjaMN Excel Programming 1 March 23rd 05 03:56 PM
Repost:replacing data on a non focused worksheet with calculated data from the same sheet BruceJ[_2_] Excel Programming 0 November 11th 03 02:39 AM
replacing data on a non focused worksheet with calculated data from the same sheet BruceJ[_2_] Excel Programming 0 November 5th 03 05:00 PM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"