IF and OR Functions

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
348
Office Version
  1. 2013
Platform
  1. Windows
I have a simple date and checkmark setup that is having problems.
Prior to trying the ‘if’ and ‘or’ in the same formula I only was using if.
Then I noticed I needed to apply a separate date depending on if something was done the day before or if it was being done on the current date.
As you can see in cells E14 thru to G15 are new formulas of this type: =IF(OR($F14=$F$2,$F14=$G$2),$F$1,$G$1)
whereas below row 15, they are of this type: =IF($F16=$F$2,$F$1,"")

What am I doing wrong here? If a cell in column F is ck then the formulas would return the date in F12. If a cell in column F is dn then the formulas would return the date in F11.
Conversely, if a cell in column F is ck then in column E would be a single checkmark, and if dn then a double checkmark.
I hope this makes sense.
Any help is much appreciated.

RestoreActions.xlsx
BCDEFGH
1Macrium Backup Restoreüüü
2#ActionAdditional Infockdn
31Roboform Before RestoreInsert any new data that was added after last Macrium Backup
42Outlook Before RestoreRun Sync Back Free For Outlook
53Outlook After RestoreCopy From E:\FromC-Outlook to >>> C:\Users\Dwight\AppData\Local\Microsoft\Outlook
64Roboform After RestoreAdd Back Into RoboForm Any New Data
75Brave Browser HistoryRun BrowsingHistoryView.exe to get current date history, paste into appropriate sheet of the current month workbook. Delete Browser History, not including TODAY27/10/202214:33:15
86Roboform Data Backup InformationRoboForm PrintList Settings: 1 Column, 70% for Logins & Safenotes, 60% for Identities; Margins: .25 Left&Right, .35 Top&Bottom
9Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Excel\Options
10How to Increase the Number of Jump List Items in Windows 10
11PureText.exeH:\Downloads\Downloads2\PureText\puretext_6.2_64-bit27/10/2022
12Pre Macrium Backup28/10/202214:33:15
13ActionAdditional Info
141Disk CleanupWindows 10 Update Wastes 20GB: How to Get It Backüdn28/10/2022
152Run sfc /scannowsfc-scannow-Imagesück27/10/2022
163Belarc AdvisorRun Belarc to get Current System Status - Save to H:\Downloads\BelArc-Adviser\Belarc Advisor Reports  
174calibre 64bit - E-book managerCheck for calibre 64bit - E-book management new version  
185WiseCareRun WiseCare: Prior to running WiseCare close all Excel Workbooks, Web Browser, Outlook etcetera so that the only program running is WiseCare  
196BrowsingHistoryView.exeRun BrowsingHistoryView.exe to get current date history, paste into appropriate sheet of the current month workbook. Delete Browser History, not including TODAY  
207Sync Back FreeRun Sync Back Free: Excel Files, If Needed and Outlook  
21Copy current ost & pst files from C:\Users\Dwight\AppData\Local\Microsoft\Outlook via Sync Back Free
228Agent RansackRun Agent Ransack to get all wbk files moved to M:\WordBackupDocs  
239RoboFormGet any RoboForm data that needs entered here in Sheet RestoreActions2  
24Run the PrintList Option in RoboForm as PDF - Save to a Current Date Folder in H:\Downloads\Roboform\PrintLists
25GoTo RoboForm Options > Account & Data > Export to Create a CSV file for Login Data; Save to Current Date Folder in H:\Downloads\Roboform\Exports
2610GoodSyncRun GoodSync Jobs But Do Not Run GoodSync for Macrium Backup from M Drive to N, O, & P Drives Until After Macrium Backup  
2711DesktopUsing Snip & Sketch get current images of desktop  
2812Brave ExtensionsGet Image of Brave Extensions  
2913Windows OS UpdatesCheck Window's Updates Per 3rd to 4th Week and How That Date Coordinates With the Next Macrium Backup; The Next Window's Updates are Scheduled for: November 24, 2022ück24/11/2022
3014Macrium ReflectRun Macrium Reflect Backup: Change Advanced Options Per: Check Box for Auto Verify Image & Uncheck Box for BackupSet File Name Prefix; Format Rescue Disk & Run a New Build on the Rescue Disk  24/11/2022
3115GoodSyncRun GoodSync for Macrium Backup from M Drive to N, O, & P Drives  24/11/2022
32Post Macrium Backup  
331Microsoft OfficeREPAIR Microsoft Office - This Requires All Micosoft Office Programs To Be Closedück28/10/2022
34
35
36November 24, 2022
MacriumSimpleSteps
Cell Formulas
RangeFormula
F7F7=TODAY()
G7,G12G7=NOW()
D8D8=MacriumBackupActions!B10
D16D16=MacriumBackupActions!B12
D20D20=MacriumBackupActions!$B$4
D21,D25D21=MacriumBackupActions!B7
D22:D23D22=MacriumBackupActions!B5
D24D24=MacriumBackupActions!B9
D26D26="Run GoodSync Jobs But Do Not "&D31&" Until After Macrium Backup"
D27D27=MacriumBackupActions!B8
D29D29="Check Window's Updates Per 3rd to 4th Week and How That Date Coordinates With the Next Macrium Backup; The Next Window's Updates are Scheduled for: "&$F$36
E14:E15E14=IF(OR($F14=$F$2,$F14=$G$2),$F$1,$G$1)
E26:E33,E22:E23,E16:E20E16=IF($F16=$F$2,$F$1,"")
D33D33=MacriumBackupActions!B25
G14G14=IF(AND($F14=$F$2,$F14=$G$2),$F$11,$F$12)
G15G15=IF(OR($F15=$F$2,$F15=$G$2),$F$11,$F$12)
G30:G33,G26:G28,G22:G23,G16:G20G16=IF($F16=$F$2,$F$12,"")
G29G29=IF($F29=$F$2,$H$30,"")
F36F36=TEXT($H$31,"mmmm dd, yyyy")
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Are ck and dn the only two possible options?

If so, I think you're looking for:

E14: =IF(F14=F$2,F$1,G$1)
F14: =IF(F14=F$2,F$12,F$11)
 
Upvote 0
Well, it kind of works. Still some bugs to work out. Essentially when "ck" is entered into any row (from row 14 down to row 33) of column "F" then the corresponding row cell in column "E" will insert only one checkmark and in addition, the corresponding row cell in column"G" will insert the date shown in cell F12.
Conversely when "dn" is entered into any row (from row 14 down to row 33) of column "F" then the corresponding row cell in column "E" will insert two checkmarks and in addition, the corresponding row cell in column"G" will insert the date shown in cell F11.
I did make a slight alteration as you will see here below.
So your formulas seem to be missing something, not sure what so I will provide here an Xl2bb Mini Sheet:
As you can see, cells F17, F18, & F19 are empty yet the corresponding row cells in columns E & G get filled in with data.

RestoreActions.xlsx
EFG
1üüü
2ckdn
3
4
5
6
728/10/202201:47:09
8
9
10
1127/10/2022
1228/10/202201:47:09
13
14üüdn27/10/2022
15ück28/10/2022
16üüdn27/10/2022
17üü27/10/2022
18üü27/10/2022
19üü27/10/2022
20  
21
22  
23  
24
25
26  
27  
28  
29ück24/11/2022
30  
31  
32  
33ück28/10/2022
MacriumSimpleSteps
Cell Formulas
RangeFormula
F7F7=TODAY()
G7,G12G7=NOW()
E14:E19E14=IF(F14=F$2,F$1,G$1)
E20,E26:E33,E22:E23E20=IF($F20=$F$2,$F$1,"")
G14:G19G14=IF(F14=F$2,F$12,F$11)
G20,G30:G33,G26:G28,G22:G23G20=IF($F20=$F$2,$F$12,"")
G29G29=IF($F29=$F$2,$H$30,"")


1666914628927.png
 
Upvote 0
You've referred to your formula and your new formula, and asked what you were doing wrong, but you haven't stated clearly what results you'd like to see.

So, again, a guess. Are you looking for?

E14: =IF(F14=F$2,F$1,IF(F14=G$2,G$1,""))
G14: =IF(F14=F$2,F$12,IF(F14=G$2,F$11,""))
 
Upvote 0
Awesome StephenCrump, you did it. This works exactly as I intended.
Thank you so much. Before posting I fought with this thing for far too long. I was putting too much emphasis on the =if(or( kind of formula.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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