Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel Formula with Reference NAME and conditional formatting

Excel Formula with Reference NAME and conditional formatting

Excel Formula with Reference NAME and conditional formatting

Hi Folks,

I have 2 different sheets in the same workbook. On the first sheet "Error Rules" I want a user to enter a general formula into a cell that will reference the cell(s) NAME on the second sheet "data". The "data" sheet includes a table.

the information is loaded from a .CSV file into the "data" sheet.

"data" Sheet layout

Error Message_________Dept_________Prod_Loc

"Invalid Prod Loc"_______2000__________WCG

formula overview

=if(Dept = 1367 and Prod_Loc = WCG, , Highlight Dept and Product_Loc in yellow and add error msg "Invalid Prod Loc")

I'd like to take the formula from the cell on the "Error Rules" sheet and using a column cell NAME on the "data" sheet, run it for all the values in that column.

How can I do this with VBA? I've already tried the cells().formula method with the NAME + i where the formula would be copied to. The problem I am having is that the user needs to enter cell reference locations into the formula on the "Error Rules" sheet.

I've also tried using a custom formula, but I am not to familiar with that so I am sure I did something wrong.


RE: Excel Formula with Reference NAME and conditional formatting

I got this working. It was a coding error

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close