• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
You are here: Home
Lost password?
sp_Search
Advanced Search|Last Search Results
Advanced Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search

Please confirm you want to mark all posts read

Mark all topics read

sp_MobileMenu Actions
Actions
sp_LogInOut
Log In
sp_Search

Search Forums

sp_RankInfo
Ranks Information
Avatar

New/Updated Topics

General Excel Questions & Answers

  Calculate occurrences of max value by hour

  Lookup in a 3 Dimentional Table

  Amortization schedule with changing interest rate

  Exact Match searching, NOT partial.

Dashboards & Charts

  Connecting 2 separate pivot charts or data sets to calculate…

VBA & Macros

  IF and Max Formula through VBA

  VBA to Have Template file remain Open after Copy is Saved &a…

Power Query

  Using Table.ReplaceValue with Text.Combine to do an in place…

  Removing columns in Power BI source file

  How to add a new query for each cell of a column

  Creating a new table from other data sources

  Converting Values from positive to Negative in Power Query

  Running total in power query

Xtreme Pivot Tables

  Structuring data to drive pivot tables.

Power BI

  Plotting a line in a visual representing cumulate sum

Select Forum

  Rules and Guides

Forum Rules and Guides

  Public Forums - For Registered Users

General Excel Questions & Answers

Dashboards & Charts

VBA & Macros

Power Query

Power Pivot

  Course Members Only

Excel Dashboards

Power Query

Power Pivot

Xtreme Pivot Tables

Excel for Decision Making

Excel for Finance

Power BI

Excel

Word

Outlook

Excel Expert

Excel for Customer Service Professionals

Excel Analysis Toolpak

Excel Tables

Excel for Operations Management

Financial Modelling

Advanced Excel Formulas

Pivot Tables Quick Start

ForumsGeneral Excel Questions &…
sp_TopicIcon
How can I implement an if statement for multiple columns?
Avatar
MOHAMMED ALMARHOOBI
Posts: 2

Level 0
February 10, 2022 - 10:37 pm

1

Hi, 

Hope you're doing well.

In column E, I used an if statement to calculate column B to get the revenue.

The question is: how can I implement the same equation for columns B, C, and D in Column E? 

I don't want to duplicate the work on each column separately.

Regards,

Avatar
Anders Sehlstedt
Eskilstuna, Sweden
Posts: 871


Level 3
February 12, 2022 - 9:17 pm

2

Hello Mohammed,

As you don't mention what Excel version you are using I only mention two simple solutions, which includes using Pivot Table to view the result or using helper columns. See attached file.

Customer Register (2)
What I have done is to adjust your data table to be in a tabular format. To be able to distinguish which rows each data belongs to I have added an index column. Then it is sufficient to use the formula you have written to calculate the sum of money. I then use a Pivot Table to view the sum per month + the grand total for all three months.

Customer Register (3)
Keeping your data table, but have added two more columns for July and August, just copied your formula to the right and then sum the three columns. It's nothing wrong with using helper columns, they can be hidden if you don't want to show them.

I hope this gives some guidance forward.

Br,
Anders

Avatar
MOHAMMED ALMARHOOBI
Posts: 2

Level 0
February 13, 2022 - 1:10 am

3

Dear Anders,

 

I appreciate your help in answering my question but was looking for an alternative. I would like to find the grand total for all three months in one column by applying the same equation.  

 

Is there a way to use this formula to sum the three months in one column without putting each month in its own column?

=IF($A2="Citizen Account",
IF(B2<=4000,B2*0.014,
IF(B2<=6000,((B2-4000)*0.017)+(2000*0.014),
((B2-6000)*0.03)+(2000*0.014)+(2000*0.017))),

IF($A2="Additional accounts",
IF(B2<=4000,B2*0.02,
IF(B2<=6000,((B2-4000)*0.025)+(2000*0.02),
((B2-6000)*0.03)+(2000*0.02)+(2000*0.025))),

IF(B2<=4000,B2*0.01,
IF(B2<=6000,((B2-4000)*0.013)+(2000*0.01),
((B2-4000)*0.02)+(2000*0.01)+(2000*0.013)))))

 

Regards,

Mohammed

Forum Timezone:
Australia/Brisbane
Most Users Ever Online: 245
Currently Online: SALLY, Valentyn Kristioglo
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)

Devices in use: Desktop (8), Phone (4)

Forum Stats:
Groups: 3
Forums: 24
Topics: 6223
Posts: 27294
Member Stats:
Guest Posters: 49
Members: 31919
Moderators: 3
Admins: 4
© Simple:Press

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.