Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Macro needed

Hi,

I'm hoping someone can help me with this...

Using XL2003

I have to workbooks lets call them book1 and book2. I need a macro that
looks through column D on book1 and matches numbers to column D on book2, if
a match is found on book2 and Coulumn G in that row has text in the cell,
copy the text from Column G and Column H and paste this into book1 Column I
and N (book2 Column G to book1 Column I and book2 Column H to book1 Column N)

Then fill the range of cells on book2 from column B to N on that specific row.

Book1 is shared workbook but book2 isn't.

I hope I have explained this clearly enough.

Appreciate any help that is provided.

Thanks in advance,

Gav.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro needed

This should get you started. Not sure what you want to fill cells B to N with.

"Gav123" wrote:

Hi,

I'm hoping someone can help me with this...

Using XL2003

I have to workbooks lets call them book1 and book2. I need a macro that
looks through column D on book1 and matches numbers to column D on book2, if
a match is found on book2 and Coulumn G in that row has text in the cell,
copy the text from Column G and Column H and paste this into book1 Column I
and N (book2 Column G to book1 Column I and book2 Column H to book1 Column N)

Then fill the range of cells on book2 from column B to N on that specific row.

Book1 is shared workbook but book2 isn't.

I hope I have explained this clearly enough.

Appreciate any help that is provided.

Thanks in advance,

Gav.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Macro needed

Hi Joel,

Thanks fo rthe reply but What should get me started??

Forgot to add that I would like the cells format to be a green fill.

Regards,

Gav.

"Joel" wrote:

This should get you started. Not sure what you want to fill cells B to N with.

"Gav123" wrote:

Hi,

I'm hoping someone can help me with this...

Using XL2003

I have to workbooks lets call them book1 and book2. I need a macro that
looks through column D on book1 and matches numbers to column D on book2, if
a match is found on book2 and Coulumn G in that row has text in the cell,
copy the text from Column G and Column H and paste this into book1 Column I
and N (book2 Column G to book1 Column I and book2 Column H to book1 Column N)

Then fill the range of cells on book2 from column B to N on that specific row.

Book1 is shared workbook but book2 isn't.

I hope I have explained this clearly enough.

Appreciate any help that is provided.

Thanks in advance,

Gav.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro needed

Which cells should be green?
What should be put in cells B to N?

Sub compare_data()

With Workbooks("Book1.xls").ActiveSheet
RowCount = 1
Do While .Range("D" & RowCount) < ""
Data = .Range("D" & RowCount)
With Workbooks("Book2.xls").ActiveSheet
Set c = .Columns("D:D").Find(what:=Data, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is nothiing Then
If .Range("G" & c.Row) < "" Then
Col_G = .Range("G" & c.Row)
Col_H = .Range("H" & c.Row)
'Need to add the fill data??????????
End If
End If
End With
.Range("I" & RowCount) = Col_G
.Range("N" & RowCount) = Col_H
RowCount = RowCount + 1
Loop
End With
End Sub

"Gav123" wrote:

Hi Joel,

Thanks fo rthe reply but What should get me started??

Forgot to add that I would like the cells format to be a green fill.

Regards,

Gav.

"Joel" wrote:

This should get you started. Not sure what you want to fill cells B to N with.

"Gav123" wrote:

Hi,

I'm hoping someone can help me with this...

Using XL2003

I have to workbooks lets call them book1 and book2. I need a macro that
looks through column D on book1 and matches numbers to column D on book2, if
a match is found on book2 and Coulumn G in that row has text in the cell,
copy the text from Column G and Column H and paste this into book1 Column I
and N (book2 Column G to book1 Column I and book2 Column H to book1 Column N)

Then fill the range of cells on book2 from column B to N on that specific row.

Book1 is shared workbook but book2 isn't.

I hope I have explained this clearly enough.

Appreciate any help that is provided.

Thanks in advance,

Gav.




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
If Then macro needed Roger Excel Worksheet Functions 4 August 14th 07 08:10 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 05:38 AM.

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"