# Applying an IF statement to a range

1. ## Applying an IF statement to a range

I have looked but cannot see if this has been asked before...

What I need to do is:

If Sheet1 C9 = 0 then all of the cells in Sheet2 B20:B30 = 0 otherwise use the indivdual cell formula

All of the individual cells in the range of B2:B30 have various formulas that look at different values within the sheet, so to get round this for the time being, I have put the forumla below into each cell.

=IF(Parameters!C9=0,0,B21*3)

Is there a way to apply an IF statement to a range a of cells, and if so, what is it.

2. ## Re: Applying an IF statement to a range

Hi, you may need to insert a helper column to do the calculation, and then use an IF statement to pull the calculated value from the helper column. Say your individual formulae are in a helper column C, then use in B21 and copy to all other cells in column B

=IF(Parameters!\$C\$9=0,0,C21)

you can hide column C if it mucks up your spreadsheet design.

hth

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1