Change cell value based on multiple other cells (=IF?)

farmertml

Board Regular
Joined
Jun 16, 2005
Messages
62
Hi All,

I have a quick question and will describe best what I want to achieve.

I have a spreadsheet with 4 cells in row 1 (A1,C1,F1,H1)
I want the value of A1 to change based on the content in cells C1 F1 & H1

If cells C1 F1 & H1 are all blank then A1 should = 1
If cell C1 has something in (and the other 2 are blank) then A1 should = 2
If cell F1 has something in (and the other 2 are blank) then A1 should = 3
If cell H1 has something in (and the other 2 are blank) then A1 should = 4

If Cells C1 and F1 have something in then A1 should = 3 (taken from the fact there is something in F1)
If Cells F1 and H1 have something in then A1 should = 4 (taken from the fact there is something in H1)
If Cells C1 F1 & H1 have something in then A1 should = 4 (taken from the fact there is something in H1)

I'm assuming this could be done using an =IF() formula but I can't work out what it should be.

I hope that's clear but if you need any other info then please let me know.

Thanks very much in advance for any light you can shed on this for me.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You sir are a genius, thank you very much.

Could you explain how the LEN works in this case, it's quite interesting.

Thanks again.
Paul
 
Upvote 0
The LEN function returns the number of characters in its argument. Zero is returned if the cell is empty.
 
Upvote 0

Forum statistics

Threads
1,216,761
Messages
6,132,573
Members
449,736
Latest member
anthx

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