VBA

Moderators: PavlinII
Number of threads: 1614
Number of posts: 3000

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Multiple IFs statements in Excel Posted by jumpgem01 on 10 Jul 2008 at 6:32 AM
I have a list of over 80 staff members in multiple worksheets, in the first worksheet I have placed a letter beside each to denote the department they belong to. I want to create a code that will check the name and apply the letter department code on the other worksheets. Can anyone help me with such a code. Would appreciate it, I am not really a programmer but still need help desperately.

Thanks Again,
Loy
Report
Re: Multiple IFs statements in Excel Posted by Madifier on 10 Jul 2008 at 9:10 AM
: I have a list of over 80 staff members in multiple worksheets, in
: the first worksheet I have placed a letter beside each to denote the
: department they belong to. I want to create a code that will check
: the name and apply the letter department code on the other
: worksheets. Can anyone help me with such a code. Would appreciate
: it, I am not really a programmer but still need help desperately.
:
: Thanks Again,
: Loy
:


If I understood correctly, this is what I have for you.
Using OpenOffice spreadsheet. Basically the same as Excel.

place this in the cel that you want the department number to display
"=INDIRECT( ADDRESS(MATCH(C2; A1:A4;0);2) )"

Name___Department____input____output
Sam____A____________Matt_____B
Matt____B
Dustin___C

indirect( ref ) is used to display department value
address( row, col ) is used to verify what cel you want
match( input, list of names, 0 ) is used to search for the name against a list. the number zero is necessary to tell computer if list is sorted or not.

thus you have:
"=indirect( address( match(input, name, 0), column(department)))"

One important item to note is the match(). if your list does not start at row 1, add the offset from 1 to the match()...
address( match()+(row_offset), name, 0 )
Report
Re: Multiple IFs statements in Excel Posted by zibadian on 10 Jul 2008 at 9:28 AM
: : I have a list of over 80 staff members in multiple worksheets, in
: : the first worksheet I have placed a letter beside each to denote the
: : department they belong to. I want to create a code that will check
: : the name and apply the letter department code on the other
: : worksheets. Can anyone help me with such a code. Would appreciate
: : it, I am not really a programmer but still need help desperately.
: :
: : Thanks Again,
: : Loy
: :
:
:
: If I understood correctly, this is what I have for you.
: Using OpenOffice spreadsheet. Basically the same as Excel.
:
: place this in the cel that you want the department number to display
: "=INDIRECT( ADDRESS(MATCH(C2; A1:A4;0);2) )"
:
: Name___Department____input____output
: Sam____A____________Matt_____B
: Matt____B
: Dustin___C
:
: indirect( ref ) is used to display department value
: address( row, col ) is used to verify what cel you want
: match( input, list of names, 0 ) is used to search for the name
: against a list. the number zero is necessary to tell computer if
: list is sorted or not.
:
: thus you have:
: "=indirect( address( match(input, name, 0), column(department)))"
:
: One important item to note is the match(). if your list does not
: start at row 1, add the offset from 1 to the match()...
: address( match()+(row_offset), name, 0 )

Another option is to use the VLOOKUP() function.
Report
Re: Multiple IFs statements in Excel Posted by ExcelGuru on 29 Apr 2011 at 12:20 PM
Hey Loy,

Where are you at thus far? You should be able to qurery each separate worksheet and build a master. From there the manipulations will be much easier.

Good luck,

Conner
Excel Statements



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.