Trying to use if and offset together.....

sedwardson

New Member
Joined
Mar 2, 2023
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hiya,

I have a workbook with two worksheets in. Worksheet one has a list of telephone numbers starting in column A2 -> A143 and in D2 -> D143 are their respective owners. The second worksheet has a list of telephone numbers with charges associated with them. I want the second worksheet to lookup the numbers in the first worksheet and put the associated owners name into column C starting at Row 2. I've looked at using the standard offset but this wont look through my range of numbers to find the corresponding owner and also tried if, countif and match statements all to no avail. I suspect either my syntax has been incorrect each time or I'm using the wrong function. Hopefully the attached will help explain further. Thanks in advance for all and any help.

PhoneShort CodeFull NameCompany
01234 567890BobCompany 1
01234 567891201FrankCompany 2
01234 567892202HarryCompany 3
01234 567893203JerryCompany 4
01234 567894204SueCompany 5


NumberTotal
01234 567890£6.00
01234 567891£6.00
01234 567892£0.00
01234 567893£6.00
01234 567894£6.00
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
are the numbers text or numbers? They look like text in your mini worksheets you have posted because they are left aligned.
 
Upvote 0
seems to work okay for me:
mr excel questions 22.xlsm
ABCDEFGHI
1PhoneShort CodeFull NameCompanyNumber Total company
201234 567890BobCompany 101234 567890£ 6.00Company 1
301234 567891201FrankCompany 201234 567891£ 6.00Company 2
401234 567892202HarryCompany 301234 567892£ -Company 3
501234 567893203JerryCompany 401234 567893£ 6.00Company 4
601234 567894204SueCompany 501234 567894£ 6.00Company 5
7
sedwardson
Cell Formulas
RangeFormula
I2:I6I2=VLOOKUP($G2,$A$2:$D$6,4,0)



with lookup values sorted differently:
mr excel questions 22.xlsm
ABCDEFGHI
1PhoneShort CodeFull NameCompanyNumber Total company
201234 567890BobCompany 101234 567894£ 6.00Company 5
301234 567891201FrankCompany 201234 567893£ 6.00Company 4
401234 567892202HarryCompany 301234 567892£ -Company 3
501234 567893203JerryCompany 401234 567891£ 6.00Company 2
601234 567894204SueCompany 501234 567890£ 6.00Company 1
sedwardson
Cell Formulas
RangeFormula
I2:I6I2=VLOOKUP($G2,$A$2:$D$6,4,0)
 
Upvote 0
Solution
Thanks @awoohaw ! That did the job perfectly ! I was even able to expand on it slightly to make the sheet even better. Again, thanks for your help.
 
Upvote 0
My pleasure, i'm happy you were able to find a solution in the forum.

Best wishes!
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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