![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 6
|
Ok guys, this should be a real easy one for the experts.
2 Quick questions 1. piece of code to run through range A2:A26 And generate a list in column E of the values of only the cells in that range with the cell to the right of it in column B that has a value. Example: A2's value is "501" and B2's value is "Joe" A2 makes the list. A3's value is "502" and B2 is blank A3 is ignored A4's value is "503" and B2's Value is "John" A4 makes the list directly under A2 So, E1 = "501", E2= "503", etc... 2. piece of code that will run through range A9:A28 of 60 different worksheets and generate a list of the values of only the cells in those ranges that are have value in a seperate worksheet. List cannot have any gaps. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
What are your questions?
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
Example code for Q1: ---------------- Sub test() Dim x As Integer, counter As Integer For x = 2 To 26 If Len(Cells(x, 2)) > 0 Then counter = counter + 1 Cells(counter, 5) = Cells(x, 1).Value End If Next x End Sub ----------------- For Q2, please post more details. Regards, Jay |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 6
|
Ok, Jay,
for second question: I have 60 worksheets for 60 different technicians. In cells A9 to A20 of each worksheet is all the equipment issued to that technician for the day. The value stored in the cell is the serial number of the piece of equipment so no 2 entries will be the same. One tech might have 10 pieces of equipment, another might have 4, and yet another might not have any but none can have more then 20. So what I need is a list generated on a seperate worksheet for all the equipment issued for the day to all the technicians. basicly, it needs to run through cells A9 through A28 of each worksheet and add the serial numbers of all the equipment issued to that tech to the list and ignore the blank cells [ This Message was edited by: neomod on 2002-04-10 10:02 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|