Formula Needed check, index??

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and Thanks in Advance!

Imagine I have Range("A1:A10") as follows:
A1= VVV1, A2=VVV2, A3=VVV3...

and in onte other Sheet named eg: Sheet2 a database and this database contains in Row 1 all the values VVV1,VVV2,VVV3,VVV4,VVV5...

I need a formula as short as possible (I can get the desired answer using If statements, but I am requesting your help to learn other way)

so if Sheets2.range("H1")=VVV10 then if Sum(Columns(Sheets1!H:H)>0 then my formula will give me 10, otherwise I have to check if the sum of the values of the columns containing the value VVV9 on the row 1 on sheet2 is >0.
And if so the the result will give me 9 otherwise I will check for VVV8 and then for VVV7...

Thanks!

At present the Values VVV1 to VVV10 of the Sheet2 are always in the same place, so VVV7 is in AC1, so using if statements I can get the answer, but imagine if VVV1 to VVV10 are located randonly???


Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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