VBA- IF statement to replace cell contents

Joined
Apr 13, 2012
Messages
8
Reaction score
0
Hello-

So I have three columns of data: Dept, Dept Desc, Location

What I'm trying to do is update the information in Dept Description if it matches criteria in the other two columns. If it doesn't match the criteria then leave as is.

For example,

If Dept = 3100 & Location = 111 Then Replace Dept Desc with "NY Warehouse"
Else If Dept = 3100 & Location = 211 Then Replace Dept Desc with "CA Warehouse"
Else Keep Dept Desc

Dept = Column E
Dept Desc = Column F
Location = Column G

I won't know the number of rows of data I will be working with either..

Any suggestions would be awesome! Thanks!
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Vlookup and If function 10
Transpose and Fill? 7
search and copy text from one sheet to others 4
best formula to use? 3
Sumifs (I think) 5
Array selections 2
Array data to a report 4
VLookup/Data Validation 1

Top