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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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

Forum statistics

Threads
1,223,710
Messages
6,174,019
Members
452,542
Latest member
Bricklin

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