Reference cell on other sheet when not blank

detriez

Board Regular
Joined
Sep 13, 2011
Messages
193
Office Version
  1. 365
Platform
  1. Windows
I have a workbook with two sheets: [Lead Template] and [CSV]

I need to reference [Lead Template] cells onto [CSV] for all populated rows and columns on [Lead Template]

I am using this formula on [CSV] and I can copy it down and across but that would bloat my file
Excel Formula:
=IF(ISBLANK('Lead Template'!A1),"",'Lead Template'!A1)

I feel like something like this might work but I'm not quite sure how to bring this all together
I'm hope to make this passive or when [CSV] is selected or has focus

VBA Code:
lRow = Cells(Rows.Count, 1).End(xlUp).Row
lCol = Cells(1, Columns.Count).End(xlToLeft).Column
=IF(ISBLANK('Lead Template'!A1),"",'Lead Template'!A1)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Edit to the original post

I need to share this on oneDrive which I guess will not support VAB/Macros so, I think my only option is a formula.
 
Upvote 0
Hi,

I must be mis-understanding your question.

1. your formula:
=IF(ISBLANK('Lead Template'!A1),"",'Lead Template'!A1)

is the Same as ='Lead Template'!A1

There's no need to check if A1 is Blank to return a Blank, it's the same, if A1 is Blank, your result will be Blank.

2. Why not just copy the entire sheet 'Lead Template'!A1 and paste Value to CSV?
 
Upvote 0
if A1 is Blank, your result will be Blank.
Not for me it isn't, if A1 is blank I get a 0 in the cell.
Not sure if that's just a version difference or not.
 
Upvote 0
Actually you're right, Excel evaluates a blank as 0 in a formula...my bad.

But I still think Copy/Paste as Value should do what OP wants?
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,572
Members
448,972
Latest member
Shantanu2024

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