irishr_ram
New Member
- Joined
- Jul 16, 2013
- Messages
- 10
Hoping someone can help as seems easy but I cannot seem to get it working.
I have a VBA script setup to email a certain selection of cells which is all working fine. However at the moment the email address it sends it to is hard coded if you will and I want to have it determine the email address depending on the value of a certain cell.
So for example I have my lookup entry in C1 which says red so my table below would be
A B
Red dave@aol.com
Blue steve@aol.com
Green terence@aol.com
Result Cell = dave@aol.com
So in this example it would pull out dave@aol.com from the result cell
The code I am trying to get right is here
.Item.To = Lookups.Range("Result Cell").Value
I have a VBA script setup to email a certain selection of cells which is all working fine. However at the moment the email address it sends it to is hard coded if you will and I want to have it determine the email address depending on the value of a certain cell.
So for example I have my lookup entry in C1 which says red so my table below would be
A B
Red dave@aol.com
Blue steve@aol.com
Green terence@aol.com
Result Cell = dave@aol.com
So in this example it would pull out dave@aol.com from the result cell
The code I am trying to get right is here
.Item.To = Lookups.Range("Result Cell").Value