ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF then statements (https://www.excelbanter.com/excel-programming/348872-if-then-statements.html)

ginab

IF then statements
 
I need a forumula that states

If B=1 then c=379

Thanks!!

Tom Ogilvy

IF then statements
 
in c1

=if(b1=1,379,"")

--
Regards,
Tom Ogilvy


"ginab" wrote in message
...
I need a forumula that states

If B=1 then c=379

Thanks!!




ginab

IF then statements
 
Great, thanks. I have 20,000 records where I need to change 1-25 to various
numbers. Can I write one forumula to change all the records?

Like =if(b1=1, 379, "", b2=2,369, "")

Thanks!!!

"Tom Ogilvy" wrote:

in c1

=if(b1=1,379,"")

--
Regards,
Tom Ogilvy


"ginab" wrote in message
...
I need a forumula that states

If B=1 then c=379

Thanks!!





M C Del Papa

IF then statements
 
This can get pretty overwhelming fast when using simple nested If-Then
statements.

A more manageable way to execute such a task would be to use the VLOOKUP
function that references a pre-defined table in your workbook.

BTW - Your example below should really be:

Like =if(b1=1, 379, "", b2=2,369, "")
Like =if(b1=1, 379, if(b2=2,369, ""))


Hope this helps!

"ginab" wrote in message
...
Great, thanks. I have 20,000 records where I need to change 1-25 to
various
numbers. Can I write one forumula to change all the records?

Like =if(b1=1, 379, "", b2=2,369, "")

Thanks!!!

"Tom Ogilvy" wrote:

in c1

=if(b1=1,379,"")

--
Regards,
Tom Ogilvy


"ginab" wrote in message
...
I need a forumula that states

If B=1 then c=379

Thanks!!







ginab

IF then statements
 
The only way I could get it to work was this:

=IF(B7=1,"3739",IF(B7=2,"3691",IF(B7=3,"3507",IF(B 7=4,"3465",IF(B7=5,"3283",IF(B7=6,"3241",IF(B7=7," 3737",IF(B7=8,"3693"))))))))

And I found out I couldn't do more then 8...? I could not get the Like to
work.

Thanks to all and I have one more question now.

I have two columns that I want to display equal values, I sorted them but
there are too many records to compare them all.

So basically I want if A=B then display A if false null.

Thanks!!

"M C Del Papa" wrote:

This can get pretty overwhelming fast when using simple nested If-Then
statements.

A more manageable way to execute such a task would be to use the VLOOKUP
function that references a pre-defined table in your workbook.

BTW - Your example below should really be:

Like =if(b1=1, 379, "", b2=2,369, "")
Like =if(b1=1, 379, if(b2=2,369, ""))


Hope this helps!

"ginab" wrote in message
...
Great, thanks. I have 20,000 records where I need to change 1-25 to
various
numbers. Can I write one forumula to change all the records?

Like =if(b1=1, 379, "", b2=2,369, "")

Thanks!!!

"Tom Ogilvy" wrote:

in c1

=if(b1=1,379,"")

--
Regards,
Tom Ogilvy


"ginab" wrote in message
...
I need a forumula that states

If B=1 then c=379

Thanks!!








All times are GMT +1. The time now is 03:17 AM.

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