Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2018, 06:58 AM
jennyyoung jennyyoung is offline Conditional Formatting in a Macro Windows 7 32bit Conditional Formatting in a Macro Office 2010 32bit
Novice
Conditional Formatting in a Macro
 
Join Date: Apr 2018
Posts: 15
jennyyoung is on a distinguished road
Default


oh.... wait I have one more question if you dont mind.... Sooooo If I already had a complete list that had all possible accounts listed and their respective plants, that would make it more consistent? Could you please show me one more time? On the attached file, the first list is the report without plants, on the 2nd tab is the complete department list with all possible entries.
Attached Files
File Type: xlsx List.xlsx (28.1 KB, 9 views)
Reply With Quote
  #2  
Old 05-15-2018, 07:26 AM
p45cal's Avatar
p45cal p45cal is offline Conditional Formatting in a Macro Windows 10 Conditional Formatting in a Macro Office 2016
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by jennyyoung View Post
Sooooo If I already had a complete list that had all possible accounts listed and their respective plants, that would make it more consistent?
Yes, the full list of all possible corresponding codes and plants will be the most consistent, and if there's a mistake in any code on Sheet2 you will be alerted to that fact by an error in the plant cell - which could be useful; it could make you ask the question do we have a new dept code? or has someone made a mistake?


It's a balancing act; do I have a long list (more difficult to maintain when there are department changes) or a shorter list where we know a given plant will be associated with a range of numbers (this is often the case with cost centre names)?
If you are going to use a full list then the 3rd argument of the MATCH function has to be 0 (it looks only for an exact match) and the dept numbers can then be in any order. Also it's easier to write the formula if you use VLOOKUP with the last argument being FALSE (also an exact match).

The two formulae are in columns D and E of Sheet2 of the attached.


If you want a friendlier thing to show than an error code, then you can enclose the formula in the IFERROR function, see cells F42 and F43 of Sheet2.
Attached Files
File Type: xlsx MSOfficeForums39050List.xlsx (30.2 KB, 9 views)
Reply With Quote
  #3  
Old 05-15-2018, 07:38 AM
jennyyoung jennyyoung is offline Conditional Formatting in a Macro Windows 7 32bit Conditional Formatting in a Macro Office 2010 32bit
Novice
Conditional Formatting in a Macro
 
Join Date: Apr 2018
Posts: 15
jennyyoung is on a distinguished road
Default

I used VLOOKUP and i think I got it to work.

My last task to add to the macro is to give me total for each plant. I hate to ask again, but it would be my last question I promise!

whats the best way to do that? thanks again for everything!
Attached Files
File Type: xlsm list2.xlsm (37.5 KB, 9 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting macro ewso Excel Programming 2 10-05-2017 12:10 AM
Conditional Formatting in a Macro Conditional formatting bbutl027 Excel 15 12-05-2016 08:56 PM
Conditional Formatting Macro grexcelman Excel Programming 1 01-10-2015 04:45 PM
Conditional Formatting in a Macro Conditional formatting that ignores other formatting rules info_guy2 Excel 1 07-03-2014 10:07 AM
Conditional Formatting in a Macro Conditional Formatting and/or Macro for Character Insertion? MonOverArchIng Word 2 01-11-2013 02:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft