# Excel Formula vba

Hello,
with the help of Expert Jeff Darling, (Thanks)
attached has been working fine, (for 10-15 columns).

I needed to add more columns into it.

1- how can I copy the formula From Column "D", to the rest of the columns (Column "E" to Column "EW") - macro
2- After Column BB, The formula doesn't seem to get results.

Any help is appreciated.
thanks,

================
Prior related question: http:Q_28612633.html
Sample-EE-jeffld.xls
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Older than dirtCommented:
Do a copy of one of the cells that has the formula and then pastespecial formulas into the new cells.
Author Commented:
the formula is always +1 column
=HLOOKUP(\$B3,NewZoneXref,(D\$2+3),FALSE)
=HLOOKUP(\$B3,NewZoneXref,(E\$2+3),FALSE)
=HLOOKUP(\$B3,NewZoneXref,(f\$2+3),FALSE)

And then , one row
=HLOOKUP(\$B3,NewZoneXref,(D\$2+3),FALSE)
=HLOOKUP(\$B5,NewZoneXref,(D\$2+3),FALSE)
=HLOOKUP(\$B5,NewZoneXref,(D\$2+3),FALSE)
Older than dirtCommented:
I don't think I can help. Let me suggest that you send an EE Message to Jeff and ask if he can help with this question.
Author Commented:
thanks for trying,
not sure how to send Jeff a direct message
Commented:
Just expand the NewZoneXref name  and add all rows to it
Commented:
you can go to formula-manage names and add the rest of rows
=Price!\$C\$4:\$AB\$108
Author Commented:
Hi FarWest,
where do I expand the NewZoneXref name  and add all rows to it .
and the Formula =Price!\$C\$4:\$AB\$108

thanks,
Commented:
You problem is the range NewZoneXRef on the Price table. It only covers upto row51, hence you get the errors for the remaining rows.

Its current range is \$C\$4:\$AB\$57, it should be \$C\$4:\$AB\$108

Every time you add more columns you need to extend that named region
Commented:
Press CTRL C and it will pop up, other answers came in as I was checking mine :(
Author Commented:
Where do I change this?
\$C\$4:\$AB\$57, it should be \$C\$4:\$AB\$108

thanks
Commented:
no problem
just go to  "Formulas"  tab - Name Manager, select the  NewZoneXref  name, down the pop-up you will find the old range,
change it to new range (modify 57 to be 108) and then press the yes check button

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
check this from office support page to know more about name range and how to manage them (excel 2010)

https://support.office.com/en-ie/article/Define-and-use-names-in-formulas-2d9abce7-42cf-4a21-a6b4-f02786f690b7
Author Commented:
Ok,
thanks
I edited the formula, I still don't get the price
I get    #REF!
Author Commented:
thank you Farwest,
it's working.
Commented:
The attached sheet has 150 columns, the lookup table only has 102 rows, so you see data upto column 102 (DA)
Author Commented:
Thank you
Commented:
you don't have to edit the formula
Sample-EE-jeffld-fixed.xls
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.