• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

How can I implement an if statement for multiple columns?|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How can I implement an if statement for multiple columns?|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…How can I implement an if statement…
sp_PrintTopic sp_TopicIcon
How can I implement an if statement for multiple columns?
Avatar
MOHAMMED ALMARHOOBI

New Member
Members
Level 0
Forum Posts: 2
Member Since:
February 10, 2022
sp_UserOfflineSmall Offline
1
February 10, 2022 - 10:37 pm
sp_Permalink sp_Print

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

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
February 12, 2022 - 9:17 pm
sp_Permalink sp_Print

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

New Member
Members
Level 0
Forum Posts: 2
Member Since:
February 10, 2022
sp_UserOfflineSmall Offline
3
February 13, 2022 - 1:10 am
sp_Permalink sp_Print

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

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Sameh Alami
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 188
Newest Members:
JUDY MLL
Scot Bailey
Kate Dyka
Kwaje Alfred Mogga
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Forum Stats:
Groups: 3
Forums: 24
Topics: 6548
Posts: 28672

 

Member Stats:
Guest Posters: 49
Members: 32834
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • 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

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

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

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.