A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

if, index, match



 
 
Thread Tools Display Modes
  #1  
Old July 6th, 2004, 06:09 PM
rsikin
external usenet poster
 
Posts: n/a
Default if, index, match

I am setting up a payroll journal entry in Microsoft Excel 2000 (PC)

(Col A) (Col B) (Col C)
(Col D)
Employee Gross Employee Gross Amount
Paralegal Smith 1000.00 Accountant 1 Macro
Lawyer Joe 1500.00 President Jose Macro
Secretary Mary 900.00
Accountant 1 1000.00

Macro is:

=INDEX($A$7:$B$138,MATCH(C7,$A$7:$A$138,0),2)

The problem is when column c is a terminated or new employee
(President) excel returns #n/a, can excel return a zero "0" instead and
highlight the cell in a color.

Also I have attached a sample spreadsheet.

Thanks for all your help!

Attachment filename: book2.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=609872
---
Message posted from http://www.ExcelForum.com/

  #2  
Old July 6th, 2004, 06:22 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default if, index, match

=IF(ISNA(MATCH(C7,$A$7:$A$138,0)),0,INDEX($A$7:$B$ 138,MATCH(C7,$A$7:$A$138,0
),2))

--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)


"rsikin " wrote in message
...
I am setting up a payroll journal entry in Microsoft Excel 2000 (PC)

(Col A) (Col B) (Col C)
(Col D)
Employee Gross Employee Gross Amount
Paralegal Smith 1000.00 Accountant 1 Macro
Lawyer Joe 1500.00 President Jose Macro
Secretary Mary 900.00
Accountant 1 1000.00

Macro is:

=INDEX($A$7:$B$138,MATCH(C7,$A$7:$A$138,0),2)

The problem is when column c is a terminated or new employee
(President) excel returns #n/a, can excel return a zero "0" instead and
highlight the cell in a color.

Also I have attached a sample spreadsheet.

Thanks for all your help!

Attachment filename: book2.xls
Download attachment:

http://www.excelforum.com/attachment.php?postid=609872
---
Message posted from http://www.ExcelForum.com/



  #3  
Old July 6th, 2004, 06:45 PM
rsikin
external usenet poster
 
Posts: n/a
Default if, index, match

The macro works great!

Thank You!


---
Message posted from http://www.ExcelForum.com/

  #4  
Old July 6th, 2004, 07:11 PM
rsikin
external usenet poster
 
Posts: n/a
Default if, index, match

On the payroll data in col a and col b

Is an employee get 2 paychecks is there anyway for excel to find two
payments and add them up automatically?

There is a sample excel attachment.


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Match & Index Combined Row & Multiple extractions Ronald Cayne Worksheet Functions 7 June 25th, 2004 03:33 AM
Error with Index + Match formula Frank Kabel Worksheet Functions 0 April 6th, 2004 05:49 PM
Index & match vs vlookup Mary Worksheet Functions 7 February 10th, 2004 01:04 AM
Index Match problem Leo Heuser Worksheet Functions 6 October 29th, 2003 07:51 AM


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


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