# If statement, need solution

#### Tommy753

##### New Member
[Use drop down selecting Quartz, Granite or solid surface (Drop down created) Cause price on left to populate price cell. Help would be appreciate finding a formula
 Quartz Drop down select type Quartz Price \$\$\$\$\$ Granite Price \$\$\$\$ Solid Surface Price \$\$\$\$ Copy to PriceCell \$\$\$

<tbody>
</tbody>

#### jtakw

##### Well-known Member
Hi,

You mean something like this?

#### Tommy753

##### New Member
Thank you, With E1 being a drop down to select. When I get in front of my computer I will apply and let you know...

#### Tommy753

##### New Member
I was thinking more an If statement because, from your example:

Lets make E1 a Data Validation drop-down with Select, Quartz, Granite, Solid Surface

When Quartz is current in E1, then populate the value in B2 or \$100 into E2
When Granite is Current in E1, then populate the value in B3 or \$150 into E2
and so on with Solid surface...

Only need cells E1(drop-down), B2,3,4 and result in E2 Where value in E1 causes data in either B2,B3 or B4 to be moved to E2.

Note: Price for each of the surfaces are being calculate from a workbook in another tab and that value is being referred to the B1-3 cells.

I hope that makes my goal a little clearer Thanks, Tommy

#### jtakw

##### Well-known Member
For what you're describing, VLOOKUP is the proper function to use rather than a Nested IF.

Are you saying the formula provided is Not working?
If the formula is Not giving you the correct results, it would most likely mean the Values/Texts in your drop down does Not match the Values/Texts in the Table (Column A), check for leading and or trailing Space(s) in both.

#### Tommy753

##### New Member
I looked closely at the formula and I even created a new scenario using simple references and it just continue to return na I'm certain my references were correct

#### jtakw

##### Well-known Member
Can you upload a sample file to a free file host like Dropbox and post the link here.

#### jtakw

##### Well-known Member
Ok,

There a few problems here:

1. Your data is Horizontal, Not Vertical as in your OP and description.
2. Your Data Validation list Does Not match the Table F38, H38, and L38.
3. You have a lot of merged cells, which could cause problems, but for this matter, it's Ok.

Solution:

Change the DV list to Match F38, H38, and L38

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>AA</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">75</td><td style=";">Select</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">76</td><td style=";">Quartz F207</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">77</td><td style=";">Granite H207</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">78</td><td style=";">Solid Surface L207</td></tr></tbody></table><p style="width:8.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Price Sheet</p><br /><br />

PS: you should have also clarified which cell the formula was supposed to be in, I had to look thru a bunch of cells to figure it out (cause it's not E1).

Last edited:

#### Tommy753

##### New Member
Thank you for your help! I was finally able to get it to work.

When selecting the data field I was incorrectly selecting the header field not both the header and the data fields together.

Once I figured that out, worked like a charm...

1,081,556
Messages
5,359,554
Members
400,533
Latest member
fpenning

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...