Named Range - Frustrating Refernce is not valid error... Please help

sakshiu20

New Member
Joined
May 13, 2015
Messages
4
My excel sheet is has two colums

Project name | Image Selected Projects position
A Image1 B 2
B Image 2 C 3
C Image 3



I have a listbox on the userform that contains multiple projects to choose from. I then extract the selected projects into column with heading selected projects. I am using named ranges to populate the pic of selected project to front end using
offset("base image,relative position,0) formula. The problem is the named range is working for 2 selected project onwards and is giving reference is not valid error for the first item. It is giving error for B in this case and working for C I have created a named range for the first item but I am unable to link it to the first item's pic. Please help in resolving this issue.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the forum. :)

I think you'll have to show us exactly what formula you are using and how the named ranges are defined.
 
Upvote 0
The formula I am using is this =offest(Input!$P$2,'All Projects'!$G$4,0) - The input is a worksheet that has all the project names and associated images. All projects is a sheet in which I am taking values from the listbox.

Function for taking in the input from listbox

Dim start As Integer
start = 4
Worksheets("All Projects").Range("F4:f300").ClearContents
For i = 0 To ListBox2.ListCount - 1
Worksheets("All Projects").Cells(start, 6).Value = ListBox2.List(i)
start = start + 1
Next i
 
Upvote 0
What's in G4 on 'All projects' when the error occurs?
 
Upvote 0
g4 is pointing to 3 which is relative position of the project in the input worksheet so I can extract its linked image

Selected projects
3 dgdfg
0
0
0
0
0
 
Upvote 0
Can you post a workbook somewhere for review? I don't think that things are quite as you describe.
 
Upvote 0
Do you have access to a site like OneDrive or Dropbox or Box.net? If so, you can upload a file to an account there and then share a link to the file here.
 
Upvote 0

Forum statistics

Threads
1,216,169
Messages
6,129,272
Members
449,497
Latest member
The Wamp

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