Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default updating data in rows from master list



Steve,

Thanks for the very fast reply and thanks for the assistance.

You said "watch for word wrap, extraneous spaces (compile the code to
find errors).
check all the "(" & ")" to make sure I got them right."

I would have no idea what your talking about never mind knowing if it's
right :) I barely know how to open a sheet.

Word wrap I think I know, Spaces? Dunno, and checking the """"""'s and
the &'s well you got me.

Where would this code be placed and compile?

Sorry for the brain lameness, I just don't know this stuff.

Allen






*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default updating data in rows from master list

Allen,

Than Welcome to the Wonderful World of VBA!

OK - let's take this a step at a time...

1. Start in Excel looking at your Master workbook.
2. Hold the Alt key and hit F11 (this will take you to the VBE)
You should be looking at 2 panels (left & right). If not...
3. Go to the View menu and select Project Explorer. Now you will
have a pane on the left titled "Project -VBAProject"
4. Find the listing for your workbook "VBAProject(Master)" and
select it.
5. Go to the Insert menu and select Module. A pane should open on
the right "Master - Module1(Code)
6. Select this pane and type:
Sub MySub
and hit enter. It will now look like this (create your own name in
place of Mysub
Sub Mysub()

End Sub
7. Now copy the code
lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.COUN T, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 to lrow
Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) = _
Worksheetfunction.Index(Workbooks("Master").Sheets ("Sheet1"). _
Columns(2),Match(Workbooks(Workbooks("Feed"). _
Sheets("Sheet1").Cells(x,1),Worksheetfunction.Inde x( _
Workbooks("Master").Sheets("Sheet1").Columns(1),0) ,1)
Next
Application.ScreenUpdating = True
and paste in the empty space.
8. Now go to the Debug menu and select Compile.
Excel will now go through the code and pick out problem areas.
A highlighted space means unwanted spaces - delete them.
Post back with any other problems - sometimes the messages are not
very enlightening.
9. Save your workbook.
10. Return to the Excel window.
11. The code can now be accessed by holding the Alt key and hitting F8,
selecting the macro that you want and clicking Run.

Start here and post back...

--
sb
"Allen Nance" wrote in message
...


Steve,

Thanks for the very fast reply and thanks for the assistance.

You said "watch for word wrap, extraneous spaces (compile the code to
find errors).
check all the "(" & ")" to make sure I got them right."

I would have no idea what your talking about never mind knowing if it's
right :) I barely know how to open a sheet.

Word wrap I think I know, Spaces? Dunno, and checking the """"""'s and
the &'s well you got me.

Where would this code be placed and compile?

Sorry for the brain lameness, I just don't know this stuff.

Allen






*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default updating data in rows from master list



Steve,

followed the instructions... Got this error: Only comments, directives,
and declarations are permitted outside procedures.

"A").End(xlUp).Row on this xlUp was highlighted

code in vb


Sub Category()

End Sub

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.Coun t, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 To lrow
Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) = _
Worksheetfunction.Index(Workbooks("Master").Sheets ("Sheet1"). _
Columns(2),Match(Workbooks(Workbooks("Feed"). _
Sheets("Sheet1").Cells(x,1),Worksheetfunction.Inde x( _
Workbooks("Master").Sheets("Sheet1").Columns(1),0) ,1)
Next
Application.ScreenUpdating = True


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default updating data in rows from master list

Sub Category()

lrow = Workbooks("Feed.xls").Sheets("Sheet1").Cells(Rows. Count, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 To lrow
Workbooks("Feed.xls").Sheets("Sheet1").Cells(x, 1) = _
WorksheetFunction.Index( _
Workbooks("Master.xls").Sheets("Sheet1"). _
Columns(2), Match(Workbooks("Feed.xls"). _
Sheets("Sheet1").Cells(x, 1), _
Workbooks("Master.xls").Sheets("Sheet1"). _
Columns(1), 0), 1)
Next
Application.ScreenUpdating = True

End Sub


--
Regards,
Tom Ogilvy



Allen Nance wrote in message
...


Steve,

followed the instructions... Got this error: Only comments, directives,
and declarations are permitted outside procedures.

"A").End(xlUp).Row on this xlUp was highlighted

code in vb


Sub Category()

End Sub

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.Coun t, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 To lrow
Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) = _
Worksheetfunction.Index(Workbooks("Master").Sheets ("Sheet1"). _
Columns(2),Match(Workbooks(Workbooks("Feed"). _
Sheets("Sheet1").Cells(x,1),Worksheetfunction.Inde x( _
Workbooks("Master").Sheets("Sheet1").Columns(1),0) ,1)
Next
Application.ScreenUpdating = True


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default updating data in rows from master list

Allen,

Tom caught my error. I told you to paste the code in the "empty space".

I meant in the space after
Sub Mysub()
and before
End Sub

Thanks Tom for catching this...
(need to work on my communication skills)

--
sb
"Allen Nance" wrote in message
...


Steve,

followed the instructions... Got this error: Only comments, directives,
and declarations are permitted outside procedures.

"A").End(xlUp).Row on this xlUp was highlighted

code in vb


Sub Category()

End Sub

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.Coun t, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 To lrow
Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) = _
Worksheetfunction.Index(Workbooks("Master").Sheets ("Sheet1"). _
Columns(2),Match(Workbooks(Workbooks("Feed"). _
Sheets("Sheet1").Cells(x,1),Worksheetfunction.Inde x( _
Workbooks("Master").Sheets("Sheet1").Columns(1),0) ,1)
Next
Application.ScreenUpdating = True


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default updating data in rows from master list

Tom,

Not close enough... My typo's got right past me.

Did realize that he pasted outside his procedure. That was due to poor
instructions from me earlier.

If I want to continue to help - I better proof read a lot better!!!
(usually I write the code in VBE and compile. didn't on this one)

Thanks for catching this!!! And thanks for your continued Support!!!

--
sb
"Tom Ogilvy" wrote in message
...
Did you look at his sample?

He has your code pasted in outside his procedure declaration.

Plus, there are some major typos in your code.

example - two instances of this:

Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) =

--
Regards,
Tom Ogilvy

steve wrote in message
...
Allen,

Make sure that this is on one line

lrow =
Workbooks("Feed").Sheets("Sheet1").Cells(Rows.Coun t,"A").End(xlUp).Row

The message you got means Excel is seeing text that it doesn't

understand.

--
sb
"Allen Nance" wrote in message
...


Steve,

followed the instructions... Got this error: Only comments,

directives,
and declarations are permitted outside procedures.

"A").End(xlUp).Row on this xlUp was highlighted

code in vb


Sub Category()

End Sub

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.Coun t, _
"A").End(xlUp).Row
Application.ScreenUpdating = False ' helps speed up the code.
For x = 1 To lrow
Workbooks(Workbooks("Feed").Sheets("Sheet1").Cells (x,1) = _
Worksheetfunction.Index(Workbooks("Master").Sheets ("Sheet1").

_
Columns(2),Match(Workbooks(Workbooks("Feed"). _
Sheets("Sheet1").Cells(x,1),Worksheetfunction.Inde x( _
Workbooks("Master").Sheets("Sheet1").Columns(1),0) ,1)
Next
Application.ScreenUpdating = True


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default updating data in rows from master list



Thanks to both of you for your continued assistance.

It looks like the _ is a line terminator ?


The first thing I did was make sure the line mentioned on 1 line.

Line looks like this - lrow =
Workbooks("Feed.xls").Sheets("Sheet1").Cells(Rows. Count, _
"A").End(xlUp).Row



When I did this the " _ " before the "A").End(xlUp).Row errored with
invalid character and highlighted " _ "

so I removed the " _ " and made it look like this

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.COUN T,
"A").End(xlUp).Row

Now when I debug I get a Compile error:

Sub or Function not defined

The word "Match" is highlighted. in the following line

Columns(2), Match(Workbooks("Feed.xls"). _

Now what? Was I wrong on the whole line? Or is it something else with
the command Match?

Allen

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default updating data in rows from master list

I gave you a complete procedure, that if you copied it and pasted it into a
general module should compile without problem.

Now whether the functionality is correct or not - I haven't tested the logic
that Steve chose, but it appears to do what he describes.

--
Regards,
Tom Ogilvy


Allen Nance wrote in message
...


Thanks to both of you for your continued assistance.

It looks like the _ is a line terminator ?


The first thing I did was make sure the line mentioned on 1 line.

Line looks like this - lrow =
Workbooks("Feed.xls").Sheets("Sheet1").Cells(Rows. Count, _
"A").End(xlUp).Row



When I did this the " _ " before the "A").End(xlUp).Row errored with
invalid character and highlighted " _ "

so I removed the " _ " and made it look like this

lrow = Workbooks("Feed").Sheets("Sheet1").Cells(Rows.COUN T,
"A").End(xlUp).Row

Now when I debug I get a Compile error:

Sub or Function not defined

The word "Match" is highlighted. in the following line

Columns(2), Match(Workbooks("Feed.xls"). _

Now what? Was I wrong on the whole line? Or is it something else with
the command Match?

Allen

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
create 1 master list from a combination of rows and columns Jason Excel Discussion (Misc queries) 3 August 17th 09 06:24 PM
Line up rows to corresponding row of larger master list in excel lospeirs Excel Worksheet Functions 13 November 26th 07 03:44 AM
deleting various rows of cell data throughout the master list tha. Flip Excel Discussion (Misc queries) 1 August 8th 06 03:14 PM
Is it possible to setup a self-updating master list? my brain hurts Excel Discussion (Misc queries) 1 July 29th 05 07:17 PM
updating data in rows from master list Allen[_8_] Excel Programming 0 September 17th 03 09:42 PM


All times are GMT +1. The time now is 06:52 AM.

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

About Us

"It's about Microsoft Excel"