Combobox select add values in other column in new cell

Closed
Report
Posts
1
Registration date
Tuesday November 28, 2017
Status
Member
Last seen
November 28, 2017
-
 Blocked Profile -
Hi

I have a set of Comboboxes populated with the same 3 text values in each one. I also have a column of numeric in the same rows as each combobox. I want to add the values of the numeric data to another cell only if the text selected in each combobox is that of a certain value.

I have this formula in cell H39 where I want the totals to be displayed:

=IF(C27="Personal Care",P27,"")

I can then get the data copied over for one row but I need to know how to add the others

1 reply


So bounce the selected value against a vlookup from the same index you are populating the combobox. In other words, sheet1 has the following:

columA(item)----------columB(value)
1. apple(item)------------5(value)
2. orange(item)-----------6(value)

The combo box gets its values from range A1:A2. The combobox places the selected value into D1.

Now, do a vlookup against the posted value. So, if your combobox places the value of apple into cell D1 then the vlookup formula would be as follows:
=vlookup(D1,A1:B2,2,false)


This says:
Lookup on range A1:B2 for the value in cell D1, and dont worry about matching the value exaclty (false).

I hope this helps.

Have FUN!