ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statement for timezones (https://www.excelbanter.com/excel-worksheet-functions/129543-if-statement-timezones.html)

Still Learning

If statement for timezones
 
I want to make a formula that will convert standard state names to time
zones. I don't want to have to nest a whole bunch of if statements though,
is there any way to do this without a macro? Is it possible to set up an IF
statement that says =if(A1="WA" OR "CA" OR "another state") then = West
Coast. I don't need it to actually give me a time, just classify them by
time zone.

Thanks in advance!!!

daddylonglegs

If statement for timezones
 
Set up a table, e.g. state abbreviations in Y2:Y50, asociated time zone name
in Z2:Z50 then use the formula

=VLOOKUP(A1,$Y$2:$Z$50,2,0)

to return the timezone name where a specific state abbreviation is contained
in A1

"Still Learning" wrote:

I want to make a formula that will convert standard state names to time
zones. I don't want to have to nest a whole bunch of if statements though,
is there any way to do this without a macro? Is it possible to set up an IF
statement that says =if(A1="WA" OR "CA" OR "another state") then = West
Coast. I don't need it to actually give me a time, just classify them by
time zone.

Thanks in advance!!!



All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com