IF a cell = specific text, then do this, if it = diff specific text then do this

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
Office Version
  1. 365
Platform
  1. Windows
Hello I have this formula i needed to edit since i made some changes to my excel sheet
This is my original formula

=OFFSET('Sheet H'!$A$32,0,((((COLUMN(D26)-4)/16)+1)*4))

I am looking to add some logic to the formula that references if a cell is equal it does a certain action,
So i am trying to add that If cell E17 is equal to "Passive" then do the original =OFFSET('Sheet H'!$A$32,0,((((COLUMN(D26)-4)/16)+1)*4))

but if E17 is equal to "General" do the same logic but reference $A$31 rather than $A$31 so =OFFSET('Sheet H'!$A$31,0,((((COLUMN(D26)-4)/16)+1)*4))

all in one formula, if this is possible
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,

Try this:

Excel Formula:
=OFFSET(IF(E17="Passive",'Sheet H'!$A$32,'Sheet H'!$A$31),0,((((COLUMN(D26)-4)/16)+1)*4))
 
Upvote 0
Hi,

Try this:

Excel Formula:
=OFFSET(IF(E17="Passive",'Sheet H'!$A$32,'Sheet H'!$A$31),0,((((COLUMN(D26)-4)/16)+1)*4))
This does work but i am trying to add logic that if the cell E17 is "General" then it would do $A$32
 
Upvote 0
So i am trying to add that If cell E17 is equal to "Passive" then do the original =OFFSET('Sheet H'!$A$32,0,((((COLUMN(D26)-4)/16)+1)*4))

but if E17s equal to "General" do the same logic but reference $A$31 rather than $A$31 so =OFFSET('Sheet H'!$A$31,0,((((COLUMN(D26)-4)/16)+1)*4))

all in one formula, if this is possible

This does work but i am trying to add logic that if the cell E17 is "General" then it would do $A$32

That's exactly the Opposite of what you said in OP, see Bold, Underlined, Red above.

So which way is the correct way ???
 
Upvote 0
That's exactly the Opposite of what you said in OP, see Bold, Underlined, Red above.

So which way is the correct way ???
My apologize fat fingered the 2

so i was thinking like a double if in the formula similar to how you had it

=OFFSET(IF(E17="Passive",'Sheet H'!$A$32,'Sheet H'!$A$31),0,((((COLUMN(D26)-4)/16)+1)*4))

=(IF(E17="Passive",(OFFSET('Sheet H'!$A$32,0,((((COLUMN(D26)-4)/16)+1)*4))),"")
=IF(E17="General",(OFFSET('Sheet H'!$A$31,0,((((COLUMN(D26)-4)/16)+1)*4))),""))

a way to combined them together
but also my apologize i read the formula wrong that you put and was thinking if it needed the "General" text added to it.

however when E17 is blank, it is giving me the value of when passive is there, is there something to add to make the cell have no value if neither passive or general is selected?
 
Upvote 0
Then this should do it, if E17 is blank, results Blank, if "Passive", use A32, otherwise, use A31.

Excel Formula:
=IF(E17="","",OFFSET(IF(E17="Passive",'Sheet H'!$A$32,'Sheet H'!$A$31),0,((((COLUMN(D26)-4)/16)+1)*4)))

NOTE: let me know if it's Also possible to have words Other than "Passive" or "General", (e.g. "Unknown", "Maybe", etc.)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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