Questions tagged [conditional-statements]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
67 views

Referenced arguments within "IF" statement are not recognized properly until ENTER key is pressed in the argument's cell

In my Excel sheet column G (Sale veneer in sqft) contains either the value TRUE or FALSE. If the value in column G is TRUE, then column M should calculate the value from column J (@Amount) divided by ...
jake's user avatar
  • 3
0 votes
1 answer
25 views

Conditionally counting the total number of matching rows for different dates

I need to monitor the TOTAL number of active female visitors by date. Tried to generate a formula by myself but failed and now ask your help. Data are as follows: For each date in column A, the ...
st4co4's user avatar
  • 115
0 votes
1 answer
181 views

Checking if OneDrive is started before running script fails

I'm trying to create a bat script that checks if OneDrive is running, and if OneDrive is not running OneDrive.exe will be started. I have 2 issues: If OneDrive is running, it will close the cmd window ...
Benny Wijnants's user avatar
0 votes
1 answer
281 views

Microsoft Outlook: Search for original sender in forwarded emails

I have to search the Outlook email inbox (PST file) of an employee based on certain criteria. Basically, I want evaluate data requests from external senders (as identified by their email addresses), ...
MsGISRocker's user avatar
0 votes
1 answer
70 views

Microsoft Excel use different multipliers based on text value in other column

I am trying to calculate a value which is using a different multiplier depending on the cell value (text) in a column (K): The text value options are "peak","shoulder","off-...
Angelika's user avatar
0 votes
1 answer
169 views

I am trying to make a formula in excel using if blank statement for multiple cells. Possibly two different arguments

My current formula is =IF(ISBLANK(J2),M2*AB2, IF(J2>1, AC2)) Important to note my formula in M2 is =IF(ISBLANK(L2),"",L2-G2) AB2=250 AC2= 550 The code runs as G2 gets a delivery date ...
Christina's user avatar
0 votes
1 answer
78 views

Microsoft Excel Conditional Formatting for Dates and Prices

I'm looking to conditionally format a table following this general idea; I have short dates in one column and years in the headers for several other columns, Id like to highlight the cell when the ...
Josh's user avatar
  • 1
0 votes
1 answer
822 views

Excel use formula to produce a conditional comma-separated list

I have a dataset in which the right 5 columns indicate with a Y/N if each row applies to that option of 5 potential options: I am looking to add one final column that uses a formula to check for each ...
JakeyG's user avatar
  • 9
1 vote
3 answers
98 views

IF statements excel help referring to multiple cells

I am struggling a bit with my IF statement and was wondering if I can get some help. I made a new column and want to have it filled based on three other cells. For example, you can see the attachment ...
Robert Wilson's user avatar
1 vote
1 answer
378 views

Is it possible to link an entry in a filtered sheet to the master sheet, matched on a key variable? (Excel)

I am trying to link a column in a filtered sheet to another column in the master sheet using a key category (i.e., id). Below is the illustrated dataset: [] As shown above, I have the master sheet, ...
amedicalenthusiast's user avatar
0 votes
1 answer
104 views

How to conditionally merge tables in Excel

I have two tables of data in Excel that were exported from our HR system. One contains estimated/planned workhours, the other contains actual worked hours. Each line has a date, hours worked, and the ...
kiyojik557's user avatar
1 vote
2 answers
457 views

getting Max/Min value in range based on a cell's condition

Greetings to all Excel gurus.. I've got the dataset shown in the image attachedenter image description here.. I'd like to show the MIN and MAX value of "Price/Oz" based on the condition if ...
maznabili's user avatar
0 votes
1 answer
222 views

Using conditional formatting to highlight cells that exceed the criteria below

I'm working on a spreadsheet that lists width of a product in cell A, and height of a product in cell B. I'm trying to apply conditional formatting to highlight these cells if they surpass the limits ...
Amnesiac's user avatar
1 vote
1 answer
2k views

Using conditional filters in FFmpeg

It blew my mind when I recently came across something new about FFmpeg despite having used it for years - the fact that it comes out of the box with advanced conditionals like if statements and lt/gt ...
Hashim Aziz's user avatar
  • 12.3k
2 votes
4 answers
188 views

How to rewrite a wall of if-elif statements

For cigs.sh - the complete script can be found here - I wrote the following ugly (but perfectly working) logic to print and format the script's output, partly just to figure out all the edge cases but ...
Hashim Aziz's user avatar
  • 12.3k
0 votes
0 answers
509 views

Excel VBA - Loop to Compare Cells, Offset entire row

Hopefully someone can help me with this! Just started learning VBA. I am trying the following code. The aim is to compare cells in rows starting from row 4 to and offset entire row up or down based on ...
HansrajR's user avatar
  • 101
0 votes
2 answers
40 views

How do I set up conditional content in excel based on multiple columns?

I'm working on a database for magic items for my d&d campaign, compiling several books and homebrew stuff into 1 file. I have a list of prices based on the rarity of the item and whether or not it ...
Dutch_597's user avatar
0 votes
1 answer
233 views

attempting Pass or Fail result based on a several cells meeting numeric criteria. "too many arguments for this function"

Here is the IF statement that is generating the error: =IF(B3<=B2, "Pass","Fail", IF(D2>=0, "Pass","Fail", IF(E2>=1,"Pass","Fail", ...
Sam Tresidder's user avatar
1 vote
0 answers
26 views

SUM IF with multiple conditions in the same collumn

How to make this work in libre office Calc? =SUM(SUMIF(Aug.N$2:N$400, {"ED","EDS","CS"},Aug.AD$2:AD$400))
user1235907's user avatar
0 votes
1 answer
234 views

How to make text appear conditionally based on form input in MS Word?

Is it possible to create a fillable form in MS Word where text appears conditionally based on what the user inputs in the form? For instance, if the user selects Option 1 from a Drop Down List, I want ...
user1224012's user avatar
0 votes
1 answer
135 views

Copy cell data from one worksheet to another worksheet only if both worksheets unique value matches

I'm new to excel & i'm hating so much but it's uses are vast. Now for my query I've a workbook containing three sheets 'Project A' , 'Project B' & 'Project C' Project A & Project B as ...
imshadow's user avatar
1 vote
3 answers
686 views

Counting unique values against a subset of a list

I'm trying to count how many unique supervisors a particulate employee has. (See an example data set below.) I'm able to do this in a round about way, but I'm wondering if any of you experts out ...
tmgriffiths's user avatar
18 votes
1 answer
16k views

Comparing two strings in zsh

I've been looking everywhere for what should be a simple example. First time trying to script something for zsh now that MacOS has switched over to it as default - how do I compare two strings in an ...
Doofitator's user avatar
0 votes
1 answer
43 views

I can't tell why my IF statement is producing false result

=IF(0<VLOOKUP($A9&$E9,'All Orders Avg'!$Q:$S,3,FALSE)<1,1,VLOOKUP($A9&$E9,'All Orders Avg'!$Q:$S,3,FALSE)) The IF Statement is supposed to find values between 0 & 1 and round them ...
user1144178's user avatar
0 votes
1 answer
3k views

Disable certain drop down list selections based on another cell

Let's say that in column A, users enter in different numbers. In column B, there are options of Y or N. If column A has a cell with the value of zero, it should disable the "N" option in column B. How ...
Manfred H.'s user avatar
3 votes
2 answers
2k views

Write a formula for "If Cell 1 contains a keyword, Then Cell 2 changes background color"

I have a list of pages in column A. I want certain cells in column B to be highlighted if the cell B1 contains the word Hotel. See below example where cells B2, B5, B8, and B10 have a background color ...
AndrewH's user avatar
  • 151
0 votes
2 answers
853 views

Using AVERAGEIF() over a range of years

I have a dataset that includes year, country, and population data. A small condensed sample is below. I am trying to write an excel statement that would calculate the average population from 1980 - ...
user1091735's user avatar
0 votes
1 answer
62 views

Condition in bash script

I want get [4 file name string] from user and pass these parameters to bash script. script should copy files in user home directory. FYI: each file might be exist or not, might be one of them exist or ...
Mehrdad's user avatar
0 votes
1 answer
86 views

What's wrong with the batch file?

A very annoying error in my batch program causes it to stop. I'm sure it's somewhere in the IF statement but I'm a beginner and I can't find anything on the web so I came here :englog CLS set/p "...
Neveerek's user avatar
0 votes
1 answer
48 views

Highlighting cell using if condition

Here is my excel sheet: ---------------------------------------------------------------- | | A | B | C | D | E | ----------------------------------------------...
PB Musics's user avatar
1 vote
0 answers
49 views

Hide, Show and Replacing PDF form content blocks with multiple fillable fields

I am trying to build a single fillable PDF form that provides hiding/showing/replacing of context-specific signature blocks containing multiple fields, after selecting a radio button. Ideally, when a ...
RRACICH's user avatar
  • 11
-1 votes
2 answers
2k views

Excel over 100% then = 100%

I am calculating percentage and currently I have cells with the formula =IF($H4="3PL",L4/Data!B$24,L4/Data!B$21) I need to add a second piece: If the answer of above is greater than 100% make it ...
Sachit Sachdev's user avatar
0 votes
1 answer
14 views

Optimize code to check a Data Validation cell to pick another cell

I have cell E2 that contains a Data Validation group: "online", "article", "journal", "proceedings" and "magazine". I am populating cell K2 with a formula that is based on E2's entry. If I select an ...
Joe's user avatar
  • 125
-1 votes
1 answer
39 views

Nested IF and AND Statement for a range

Here's what I'm trying to accomplish: I have a cell, U5 which has a value between 2-18 ... If U5 < 6, assign a 1 If U5 is >5 but <9, assign a 3 If V5 is >8 but <15, assign a 6 If V5 is >14, ...
Josh's user avatar
  • 1
1 vote
1 answer
654 views

TCL/Expect script with if/else logic based on host IP address

So I have been using and enjoying /usr/bin/expect for scripts because it can quickly log me into servers since it autocompletes my userid and password. Through some cursory reading, I've come to ...
user1004512's user avatar
4 votes
2 answers
15k views

How does bash test 'false'?

$ false $ echo $? 1 $ if [[ false ]]; then echo 'do it'; fi do it $ test false && echo 'do it' do it $ COND=false $ echo $COND false $ if [[ $COND -ne 0 ]]; then echo 'do it'; fi $ if [[ $...
Darren Weber's user avatar
1 vote
0 answers
47 views

Preserve Styles in Microsoft Word 2016 Conditional Text

I have an MS Word document from which I need to create 2 subdocs for internal/public audiences. I am using the IF field to condionalize the master doc. In one section, the "truetext" contains a few ...
Sweeneyskirt's user avatar
0 votes
1 answer
23 views

Is there a better way to accomplish this? Excel copy-pasting using conditional statement based on formatting conditions of the cells above and below

How can I achieve the after where the dates are copied next to the appropriate expenses without having to manually copy paste? I guess the logic is that all the charges copy the date before them which ...
Fy-consultant's user avatar
0 votes
1 answer
93 views

Run command only on certain files in subfolders, depending on other files

I've got a folder called Music, that has subfolders of different artist, containing a whole lot of .flac files. I'm trying to convert all of them into the .wav file format and then convert them to ...
bastianplettner's user avatar
-2 votes
1 answer
40 views

I'm trying to return the results of one of the if statements, but I am only able to get True/False results? [closed]

=IF(OR(AND(C11=1,(B13+3+(VLOOKUP(C15,'Locks and Readers per day'!A:B,2,FALSE)))), AND(C11=2,(B13+3+(VLOOKUP(C15,'Locks and Readers per day'!A:C,3,FALSE)))),(C11=3,(B13+3+(VLOOKUP(C15,'Locks and ...
Guy's user avatar
  • 33
1 vote
2 answers
244 views

Can I implement IF EXIST with a given file extension?

I'm in the process of making a batch script to autoexecute a program if a given file type (in this case specifically *.iso) is found. Here is the current direction I'm headed: IF EXIST *.iso GOTO :...
Mr. Mendelli's user avatar
  • 1,239
2 votes
0 answers
220 views

Ignoring /substituting missing certificate files in apache 2.4 config

Are there any directives or constructs I can use in Apache 2.4 to prevent Apache from failing to load at all if a certificate file is missing for an https Virtualhost is missing. (I am dealing with a ...
davidgo's user avatar
  • 69.6k
0 votes
1 answer
787 views

how to use Jenkins conditionals?

I have a flow inside a simple project, I want to do the following if the day is Saturday I want to run job A else I would like job B to run, schematically like this: DAY = $(date+"%A") if($DAY == ...
Asya Olshansky's user avatar
2 votes
1 answer
1k views

Sending specific email based on cell values in Excel 2016?

Is there a more efficient way to send email reminders to a user based on a cell value that changes frequently? Here's the code of what I'm working on so that you guys could understand the context of ...
Wen Yao Wen Yao's user avatar
1 vote
1 answer
61 views

Excel: Identify Cells with Duplicate Value in One Cell, and Equals 0 in the Next Cell

I am trying to remove inactive print queues from a print server. Each printer has a separate queue for each tray. The catch is that I only want to remove queues which have no activity on any of its ...
DonVonCount's user avatar
1 vote
1 answer
121 views

Excel 2016: to find the first occurance of a value in a vector

I have a vertical vector (see below) and I am looking for a function where I can search for the first occurance of the "1" or a "2" or a "3". If I find the first "1" I would add a value to a cell and ...
Alexander's user avatar
1 vote
1 answer
58 views

Excel 2016 conditional statement in combination with an OR?

Is it possible to combine a conditional statement w/ BOOLEAN OR, like: =IF(x=1 OR 2) do x o/w do y ?
Alexander's user avatar
0 votes
1 answer
130 views

EXCEL 2016 VLOOKUp or conditional statement?

The aim is to compare a halogen light bulb with a LED bulb to find out which technology is cheapest in the long run. I want to check when a Halogen bulb burns out during the year. The "lifetime" is ...
Stacy's user avatar
  • 1
0 votes
2 answers
11k views

Excel - If two cells are greater than 0, than return the cell that is greater, if only one cell is greater than 0, than return that value

I have been trying to figure this out for a while now but I'm stuck on the [value_if_false] part and I feel like it's really simple but it's not coming to me. So basically, trying to display the ...
L. Quirk's user avatar
1 vote
1 answer
179 views

Vba Excel : using OR column condition without duplicating row

This is an updated version for this. The above solution is good, until I realized when I put in massive data, the for loop generates duplicate rows (which unwanted results) I found some method ...
ExcelNovice's user avatar