Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to sum a column using vb
i have two columns in excel the first column contains some cells with Y (for
yes) in them and N (for no) the second column contains a financial amount i.e. £5.00 next to each letter (Y or N) i want to create a cmd button which contains an 'if' statement to sum all the financial cells where the cells next to it contains "Y" i.e. column 1 Column 2 y £5 y £5 n £5 sum = £10.00 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to sum a column using vb
Hi,
Use sumIf SUMIF(range to evaluate,criteria,sum_range) Application.WorksheetFunction.SumIf(Columns("A"), "Y", Columns("B")) Regards JY "smason" wrote in message ... i have two columns in excel the first column contains some cells with Y (for yes) in them and N (for no) the second column contains a financial amount i.e. £5.00 next to each letter (Y or N) i want to create a cmd button which contains an 'if' statement to sum all the financial cells where the cells next to it contains "Y" i.e. column 1 Column 2 y £5 y £5 n £5 sum = £10.00 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
divide column(x) by column(y) to give column(x/y) in excel? | New Users to Excel | |||
Referencing date column A & time column B to get info from column | Excel Discussion (Misc queries) | |||
Return text in Column A if Column B and Column K match | Excel Worksheet Functions | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Discussion (Misc queries) | |||
Divide Column A by Column B multiply Column C | Excel Worksheet Functions |