IF and AND formula

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello formula experts
I have these 3 sheets in the workbook and I want to get the data in sheet C from sheet B depending on the sheet A. In short, it is 2 if conditions in one formula. If the cell match 2 conditions then get Taxable value in cell H2 else show blank.
1. =IF(LEFT(B!A7,2,=A!$A$1
2. =IF(B!I7='C'!$H$1
Can someone please tell me the correct formula to apply in cell C2 and get the right answer.?
something is wrong with XL2BB. When I select the Capture range > select all, the buffering doesn't stop and I have to close the sheet.
Get Amount in GST class.xlsm
 
if you put
=IF(AND(LEFT(B!$A7,2)*1=A!$A$1,B!$I7=H$1),B!$J7,"")
into H2 = then copy across and down
does that work
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
if you put
=IF(AND(LEFT(B!$A7,2)*1=A!$A$1,B!$I7=H$1),B!$J7,"")
into H2 = then copy across and down
does that work
Yes it is showing one value which is right.
 
Upvote 0
The H to M columns are working. Now need to edit the code in columns N to S.
I was able to drag the formula from H to M to down.
 
Upvote 0
ok, so i have fixed the columns and rows with $ - so as its dragged those dont change
=IF(AND(LEFT(B!$A7,2)*1=A!$A$1,B!$I7=H$1),B!$J7,"")
as it dragged across - then the columns are the ones that will change
so the only column thats allowed to change is =H$1 now that will change to I,J,K etc as dragged to the right
and when dragged down - its the rows
so the rows that will change are
(B!$A7,2
B!$I7
,B!$J7
as you go down they will change to 8,9,10,11 etc

see if you can now based on that can change N to S
 
Upvote 0
I got the other formula to correct.
=IF(AND(LEFT(B!$A7,2)*1<>A!$A$1,B!$I7=N$1),B!$J7,"")
 
Upvote 0
I just did that. Based on your formula I had to replace = with <>
 
Upvote 0
Thanks Man. :). You really solved the biggest problem in this project.
 
Upvote 0
ok
you are welcome

the $ is an important part of excel
known as relative and absolute addressing
so good to understand how that works

probably used in every excel sheet setup at some point
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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