Dsum based on form

luvbite38

Active Member
Joined
Jun 25, 2008
Messages
368
HI GUYS,

I am trying to sum four columns based on condition on the form

example

I have four columns i.e. PG in 1, PG in 2, PG in 3 and PG in 4.
and
a drop down box in form called select PG value

lets say if user selects 0001 - Apple from userform,

I want to sum $ in PG 1 to PG 4 where the value in PG in 1 to 4 is equal to left 4 (i.e. 0001) of the left 4 of the PG 1 to PG 4.

Hope it makes sense?

PG1 PG 2 PG3 PG4
0001-A 0001-A 0003-A 0001-C
0001-A 0002-A 0002-A 0002-D
0001-A 0002-A 0004-A 0001-E

$ IN PG 1 $ IN PG 2 $ IN PG 3 $ IN PG 4
1 1 1 1

1 1 1 12

1 1 1 10

USER SELECTED 0001 - A

ANSWER EXPECTED FOR ALL 0001
15

HOPE IT MAKES MORE SENSE?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top